var request; request = new XMLHttpRequest; request.open('GET', 'https://zeus.ugent.be/game/top4/show.json', true); request.onload = function() { var data, el, i, len, str, x; if (request.status >= 200 && request.status < 400) { data = JSON.parse(request.responseText); str = ""; for (i = 0, len = data.length; i < len; i++) { x = data[i]; str += "\n \n \n \n"; } str += "
\n \n \n " + x.github_name + "\n \n " + x.score + "\n
"; el = document.getElementById('gamification-coders'); el.innerHTML = str; } else { } }; request.onerror = function() {}; request.send();