Skip to content

Instantly share code, notes, and snippets.

@LonnyGomes
LonnyGomes / coved-parse.js
Last active May 25, 2020 20:36
COVID data parsing example
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