Hi i want to fetch data from avascan api and display it in html, but i am not able to do this. I have tried fetch api, json and ajax ways but none worked for me. Any suggestions? This is my html https://avascan.info/api/v1/home/statistics
const api_url = 'https://avascan.info/api/v1/home/statistics';
async function getAVA() {
const response = await fetch(api_url);
const data = await response.json();
const {
blockchains,
validators
} = data;
document.getElementById('lat').textContent = blockchains.toFixed(2);
document.getElementById('lon').textContent = validators.toFixed(2);
}
getAVA();
setInterval(getAVA, 1000);
<h1>What the stats?</h1>
<p>
blockchains: <span id="lat"></span>°<br /> validators: <span id="lon"></span>°
</p>
<div id="issMap"></div>