Json test 1.1


JSON Data Viewer


// Function to fetch and display JSON from a URL
function fetchAndDisplayJSON() {
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.has(‘JSON’)) {
const jsonUrl=”https://joe-x5.github.io/x0-store-kaios/apps.json”; // Link to JSON file

fetch(jsonUrl)
.then(response => response.json())
.then(data => {
document.getElementById(‘json-display’).textContent = JSON.stringify(data, null, 2);
})
.catch(error => {
document.getElementById(‘json-display’).textContent = `Error fetching data: ${error}`;
});
} else {
document.getElementById(‘json-display’).textContent=”No JSON query parameter found.”;
}
}

// Call the function when the page loads
window.onload = fetchAndDisplayJSON;



Source link



from X0 Games 🎶 Notice: Use Full Links 1. x0.rf.gd 2. x0.ct.ws 3. x00.yzz.me 4. x0allkaios.blogspot.com 5. x0storekaios.blogspot.com 6. x0-update.blogspot.com 7. store.x0.rf.gd #x0storekaios , #x0allkaios , #x0team , x0ai , #X0CHAT5

Comments

Popular posts from this blog

X0 CHAT5 KaiOS - New Update