But I thought the data
was the variable output of the json resp
the line above that.
Is there a link to description about this? I’ve tried fetch from api to div etc…
And also numerous stackoverflow pages. But they are different (in my eyes ofcourse ) from what I have or want to achieve.
I’m pretty sure this example says it but I can’t muster the same result.
fetch('products.json').then(function(response) {
return response.json();
}).then(function(json) {
products = json;
initialize();
}).catch(function(err) {
console.log('Fetch problem: ' + err.message);
});