📜  更新文件 json trong javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:51.687000             🧑  作者: Mango

代码示例2
//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));