-1

I tried so many ways to read json file like with importing fs etc. the last way i used is there.

I researched about it and so many peoples says use it if u're trying to read json file but its giving a SyntaxError

here is my code;


fetch(url, {mode:"no-cors"})
.then(res => res.json())
.then(out =>
  console.log('Checkout this JSON! ', out))
.catch(err => {throw err});```

0 Answers0