Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Convert a single element list to a string

I have a list with just one value

"list": [
            "abcdef0000001"
        ]

which I need to convert to a string, to be like:

"var": "abcdef0000001"

Is there an easy way to do it? I couldn’t find it.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I tried converting with | string but that didn’t help.

>Solution :

You can directly assign "var" = list[0]

Hope this should work for you

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading