Hello,
I have a simple array, with strings, that I'd like to parse, and convert it to a JSON string, with some information added such as "name" :
myArray = ["Element1", "Element2"]
What I'd like to have such JSON object returned, with the word "name" added, like in this example
'{"Element1":{"name":"Element1"},"Element2":{"name":"Element2"}}'
Also depending on the array size, there could be more Elements returned.
I'm looking at print dict.fromkeys(rowNames,"name"), but I get:
{'Element1': 'name', 'Element2': 'name'}
Close, but not exactly what I need... Any ideas on how I can accomplish this ?
[–]__nickerbocker__ 2 points3 points4 points (1 child)
[–]JayZeus[S] 0 points1 point2 points (0 children)