how get a json object from an api in javascript
snippet in javascript

how get a json object from an api in javascript

user1404

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

fetch(url)
.then(res => res.json())
.then((out) => {
  console.log('Checkout this JSON! ', out);
})
.catch(err => { throw err });