title: javascript manipulate json object
body: <p>For example, I have the following JSON object <code>json_obj1</code></p>
  
  <pre><code>json_obj1 = {x:{id:1,bars:{show:true,barWidth:0.4}}}
  </code></pre>
  
  <p>Now, how could I add the following object (using javascript):</p>
  
  <pre><code>   y:{id:2,bars:{show:true,barWidth:0.4}}
  </code></pre>
  
  <p>to <code>json_obj1</code> so that it will be:</p>
  
  <pre><code>{x:{id:1,bars:{show:true,barWidth:0.4}},y:{id:2,bars:{show:true,barWidth:0.4}}}
  </code></pre>