I have to read JSON file using React.js which is stored in local drive in Mac. I tried using fetch() api but I get data undefined. Heres my code.
fetch('http://localhost:300/107k.json')
.then(req => console.log(req))
.then(data => console.log(data))
I am getting data as undefined. How will I be able to read JSON file in react.js?