I can't read my object JSON in the line (return JSON.parse(request.responseText)["rounds"];) i tried to replace rounds.matches or rounds[matches] put it doesnt worked i just want to display score1 & score2 together like 71. Thanks in advance for your help !
function run(teamKey) {
/*
* Some work here; return type and arguments should be according to the problem's requirements
*/
let request = new XMLHttpRequest();
request.open('GET', 'https://raw.githubusercontent.com/openfootball/football.json/master/2014-15/en.1.json', false);
request.send(null);
if (request.status === 200) {
return JSON.parse(request.responseText)["rounds"];
}
goals = null;
return goals;
}