Answers for "how to get json data from url in html"

4

how get a json object from an api in javascript

let url = 'https://example.com';

fetch(url)
.then(res => res.json())
.then((out) => {
  console.log('Checkout this JSON! ', out);
})
.catch(err => { throw err });
Posted by: Guest on March-17-2020
0

how to get json data from url in html

let url = 'https://www.zedge.net/wallpapers';

fetch(url)
.then(res => res.json())
.then((out) => {
  console.log('Checkout this JSON! ', out);
})
.catch(err => { throw err });
Posted by: Guest on April-19-2021

Code answers related to "how to get json data from url in html"

Code answers related to "Javascript"

Browse Popular Code Answers by Language