c.key = "test";
a = {};
a.body = {};
a.body.interval={};
a.body.interval = c.key;
b = {};
b.body = {};
b.body.interval={};
b.body.interval = c.key;
c["key"]="sample";
return JSON.stringify(a);
I want to change all the values which are referred by mentioned variable in javascript.
Currently, this print
{"body":{"interval":"test"}}
I want to change properties referred by c.key.
I can not change individual properties of JSON as those are not fixed.
How can I change all the properties referred by an individual variable in javascript?