Closed rafaelsabino closed 4 years ago
I would like to pass the data from a json url to jquery array.
The URL is as follows https://pomber.github.io/covid19/timeseries.json
She returns me IDS as below:
{"Afghanistan": [{"date": "2020-1-22", "confirmed": 0, "deaths": 0, "recovered": 0}, {"date": "2020-1-23" , "confirmed": 0, "deaths": 0, "recovered": 0}, {"date": "2020-1-24", "confirmed": 0, "deaths": 0, "recovered": 0
}, .... However, I would like to ignore the country ID and group all the data in date, confirmed cases, deaths, recovered, to have a complete series.
It would look something like this:
["2020-1-22", 156, 211, 418], ["2020-1-23", 310, 245, 301], ...
If you can help me, I would be grateful.
I would like to pass the data from a json url to jquery array.
The URL is as follows https://pomber.github.io/covid19/timeseries.json
She returns me IDS as below:
{"Afghanistan": [{"date": "2020-1-22", "confirmed": 0, "deaths": 0, "recovered": 0}, {"date": "2020-1-23" , "confirmed": 0, "deaths": 0, "recovered": 0}, {"date": "2020-1-24", "confirmed": 0, "deaths": 0, "recovered": 0
}, .... However, I would like to ignore the country ID and group all the data in date, confirmed cases, deaths, recovered, to have a complete series.
It would look something like this:
["2020-1-22", 156, 211, 418], ["2020-1-23", 310, 245, 301], ...
If you can help me, I would be grateful.