I see alot of examples online it goes:
fetch(url)
.then((resp) => resp.json()) // Transform the data into json
.then(function(obj) {
// do stuff
})
})
Why not just:
fetch(url)
.then(function(data) {
var obj = data.json();
// do stuff
})
})
Why is another "then" required... or is it required?