I am currently working with an object list retrieved from an API. The response looks something like this:
{
"1/22/20": {
"new_daily_deaths": 0,
"total_cases": 1,
},
"1/23/20": {
"new_deaths": 0,
"total_cases": 10,
},
"1/24/20": {
"new_deaths": 0,
"total_cases": 20
}
}
The expected output should look like this:
{
x:1/22/20,1/23/20,1/24/20 // key of every object
y:1,10,20 //total_cases
}
I need help figuring out how to achieve this desired format. I have already attempted using object.stringify
, but it's not providing the expected result.