function updateCounters() { fetch(https://mydisneyworld.com/obs1/') // Replace with the URL of your JSON data source .then(response => response.json()) .then(data => { const subscriberCount = data.subscriberCount; // Assuming the JSON data has a 'subscriberCount' field
// Update the counter const subscribercountElement = document.getElementById('"subscribercount'); subscribercountElement.innerHTML = subscriberCount; }) .catch(error => { console.error('Error fetching JSON data:', error); }); } updateCounters(); setInterval(function() { updateCounters(); }, 30000);