xxxxxxxxxx
const ciqlJSON = require('ciql-json')
ciqlJson
.open("file.json")
.set("address", {town : "", city : ""})
.save()
xxxxxxxxxx
//Using edit-json-file for NodeJS, based off the NPM documentation for edit-file-json
const editJsonFile = require("edit-json-file");
let file = editJsonFile(`${__dirname}/filename.json`);
file.set("name", "value");
file.save();
file = editJsonFile(`${__dirname}/filename.json`, {
autosave: true
});
xxxxxxxxxx
//inistall ciql-json : npm i ciql-json
const ciqlJson = require("ciql-json")
ciqlJson
.open("file.json")
.set("address", {town : "", city : ""})
.save()