fetch(url).then(response => { return response.json(); //you can use other things like .text() to get different parts of the returned packet }).then(json => { finalOutput = json; })