title: Add new attribute dynamically to the existing JSON array in Node
body: <p>I need to add an attribute which doesn't exist in the current JSON. The json object looks like below.</p>
  
  <pre><code>var jsonObj = {
          "result" : "OK",
          "data" : []
      };
  </code></pre>
  
  <p>And I want to add temperature inside 'data'. I could do it like below.</p>
  
  <pre><code>jsonObj.data.push( {temperature : {}} );
  </code></pre>
  
  <p>And then, I want to add 'home', 'work' inside 'temperature'. The result would be like below.</p>
  
  <pre><code>{
      "result" : "OK",
      "data" : [
          { "temperature" : {
              "home" : 24,
              "work" : 20 } }
      ]
  };
  </code></pre>
  
  <p>How could I do this? I succeeded to insert 'temperature' inside 'data', but couldn't add 'home' &amp; 'work' inside temperature. There could be more inside the 'temperature' so it needs to be enclosed with {}. </p>