Answers for "read and write to json in nodejs"

2

nodejs manipulate file json write

//change the value in the in-memory object
content.val1 = 42;
//Serialize as JSON and Write it to a file
fs.writeFileSync(filename, JSON.stringify(content));
Posted by: Guest on December-07-2021

Code answers related to "read and write to json in nodejs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language