Please excuse my first post. So I got a RapidAPI for Covid-19 updates set up and properly spouting it's results to the console as an array JSON as the following: YAML Array Output Now, I want to be able to list specific countries and their following info from the JSON array using fetch and inner HTML method from the JSON array above. So, I tried to use
document.getElementById('countryname').innerHTML = response.0.country;
which returns an error. But each country is defined under their own tables using numbers 0 to 232.
So I tried
document.getElementById('countryname').innerHTML = response.country[0];
but it returns as "Cannot read property '0' of undefined." I looked everywhere for the solution and I'm stumped. response.country by itself also turns up as undefined.