1//Using edit-json-file for NodeJS, based off the NPM documentation for edit-file-json
2const editJsonFile = require("edit-json-file");
3let file = editJsonFile(`${__dirname}/filename.json`);
4file.set("name", "value");
5file.save();
6file = editJsonFile(`${__dirname}/filename.json`, {
7 autosave: true
8});