I am trying to loop through the array of objects below to get the data value in this format:
Market_Name, District_Name, State, Commodity, Variety, datetimes, Price
{
"Market_Name":{
"0":"A lot",
"1":"A lot",
"2":"A lot",
"3":"A lot",
"4":"A lot",
"5":"A lot"
},
"District_Name":{
"0":"Ratlam",
"1":"Ratlam",
"2":"Ratlam",
"3":"Ratlam",
"4":"Ratlam",
"5":"Ratlam"
},
"State":{
"0":"AP",
"1":"AP",
"2":"AP",
"3":"AP",
"4":"AP",
"5":"AP"
},
"Commodity":{
"0":"Wheat",
"1":"Wheat",
"2":"Wheat",
"3":"Wheat",
"4":"Wheat",
"5":"Wheat"
},
"Variety":{
"0":"Medium",
"1":"Medium",
"2":"Medium",
"3":"Medium",
"4":"Medium",
"5":"Medium"
},
"datetimes":{
"0":"2020-01-01",
"1":"2020-01-02",
"2":"2020-01-03",
"3":"2020-01-04",
"4":"2020-01-05",
"5":"2020-01-06"
},
"Price":{
"0":"1981",
"1":"1970",
"2":"1981",
"3":"1970",
"4":"1968",
"5":"1974"
}
}
I have done some scripting but none seems get the desired result of what I want. Can anyone assist on how to solve this?