How to get JSON from URL
xxxxxxxxxx
let url = "server.domain/data/my_file.json"
fetch(url)
.then(res => res.json())
.then(out =>
console.log('Checkout this JSON! ', out))
.catch(err => { throw err });
xxxxxxxxxx
let url = 'https://labtask87.s3.amazonaws.com/employeedata.json';
fetch(url)
.then(res => res.json())
.then((out) => {
console.log('Checkout this JSON! ', out);
})
.catch(err => { throw err });
xxxxxxxxxx
let url = 'https://assets9.lottiefiles.com/packages/lf20_gjmecwii.json';
fetch(url)
.then(res => res.json())
.then((out) => {
console.log('Checkout this JSON! ', out);
})
.catch(err => { throw err });