I am working with a hi.json file that contains an object. In my JavaScript code, I import this JSON file like so:
var obj = require("hi.json");
Now, I need to figure out how to write data into the JSON file programmatically using JavaScript. Is it possible to do something like this?
obj["key"] = "value";
// This change should also be saved in hi.json