I have a multidimensional list which looks like below:
[
['Name1','5','6','7'],
['Name2','3','8','5'],
]
As you can see, in the above multidimensional list, we have two lists with two names and their values. This generated by an algorithm which can generate more names like 4 names thus, there might be 4 lists inside the multidimensional list.
Based on this I have to save the above info in a json, which looks like below:
{
"id": "id",
"Values": [
{
"Name": "Name1",
"X": "85",
"Y": "78",
"Z": "10"
},
{
"Name": "Name2",
"X": "85",
"Y": "78",
"Z": "10"
}
]
}
So all the name will go inside ['Values']['Name'] followed by the int numbers but I am getting confused as to how to save list items in json as it is not fixed. can anyone help me on this.
Thanks