For example, I have the following JSON object json_obj1
json_obj1 = {x:{id:1,bars:{show:true,barWidth:0.4}}}
Now, how could I add the following object (using javascript):
y:{id:2,bars:{show:true,barWidth:0.4}}
to json_obj1
so that it will be:
{x:{id:1,bars:{show:true,barWidth:0.4}},y:{id:2,bars:{show:true,barWidth:0.4}}}