I was wondering why does this happen?
I have an json object stored in var myObj:
var myObj = JSON.parse(fs.readFileSync(\'json/data.json\', \'utf8\')
You are not cloning ! :/
Replace this:
var modObj = myObj;
By this:
var modObj = JSON.parse(JSON.stringify(myObj));
If myObj is an array do this:
var modObj = myObj.slice();