I have created a little chat bot following the tutorial of Esther Crawford. This bot check the string that enter the user and respond with one of my json answer.
For e
Assuming you got your json already loaded:
var json = '{"hola":"ciao"}';
//Parse the JSON: convert it into an object
var parsedJson =JSON.parse(json);
//add whatever you want
parsedJson.hi = 'bye';
Your json var will look like:
Object {hola: "ciao", hi: "bye"}
Then you can convert the object to string doing JSON.stringify(parsedJson)
and write back to disk/DB if you're manipulating it in your backend (ie.: NodeJs).