I need assistance converting an object into an array format. Here is the input object:
{
"index": {
"0": 40,
"1": 242
},
"TID": {
"0": "11",
"1": "22"
},
"DepartureCity": {
"0": "MCI",
"1": "CVG"
},
"ArrivalCity": {
"0": "SFB",
"1": "LAS"
},
"Price": {
"0": 90,
"1": 98
}
}
The desired output should look like this:
[
{
"index": 40,
"TID": "11",
"DepartureCity": "MCI",
"ArrivalCity": "SFB",
"Price": 90
},
{
"index": 242,
"TID": "22",
"DepartureCity": "CVG",
"ArrivalCity": "LAS",
"Price": 98
}
]
I attempted to use for loops, but it became quite complicated. Any help on simplifying this process would be greatly appreciated.