This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const endpoint = | |
'https://wuhan-coronavirus-api.laeyoung.endpoint.ainize.ai/jhu-edu/timeseries?onlyCountries=true'; | |
const parseResults = (data) => { | |
// create main object to store all totals | |
const worldwideTotals = {}; | |
// loop through the data from each country | |
data.forEach((curCountryData) => { | |
// extract the timeseries object from the current country data |