Working with JSON - Learn web development | MDN

PHOTO EMBED

Fri Mar 04 2022 18:18:11 GMT+0000 (Coordinated Universal Time)

Saved by @mboljar

async function populate() {

  const requestURL = 'https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json';
  const request = new Request(requestURL);

  const response = await fetch(request);
  const superHeroes = await response.json();

  populateHeader(superHeroes);
  populateHeroes(superHeroes);

}
content_copyCOPY

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON