📅  最后修改于: 2022-03-11 15:02:51.687000             🧑  作者: Mango
//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));