casesByCountry = {
let byCountry = []
tables.forEach(rows => {
rows.forEach(row => {
row.Date=row.Date||{}
let str = row.Date.text || ''
str = str.toLowerCase()
if (str.includes(country)) {
Object.keys(row).forEach(date => {
if (date !== 'Date' && date !== 'First reported case') {
byCountry.push([date.replace(/-/g,' '), row[date].number || 0])
}
})
}
})
})
return byCountry
}