Answers for "file object to json javascript"

1

json file to object js

var data = JSON.parse(fs.readFileSync(filePath));
Posted by: Guest on August-04-2021
1

read json file javascript

fetch("file.json")
    .then(Response => Response.json())
    .then(data => {
        console.log(data);
  		// or whatever you wanna do with the data
    });
Posted by: Guest on October-03-2021

Code answers related to "file object to json javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language