title: Add data to existing json object
body: <p>So what i'm trying to achieve is creating a <em><code>json</code></em> flat file to store user info where i'm stuck is that i don't know how to add new nested objects that are empty and then save the json file and reload it.</p>
  
  <p>what i have in my <code>*json*</code> file is this.</p>
  
  <pre><code>{
      "users" : {
          "test" : {
  
          },
          "test1" : {
  
          }
      }
  }
  </code></pre>
  
  <p>I'm trying to add as many new objects as i want to it. So for example.</p>
  
  <pre><code>{
      "users" : {
          "test" : {
  
          },
          "test1" : {
  
          },
          "test2" : {
  
          },
          "test3" : {
  
          }
      }
  }
  </code></pre>
  
  <p><strong>My server side Javascript</strong></p>
  
  <pre><code>    json.users.push = username;
      fs.writeFile("./storage.json", JSON.stringify(json, null, 4) , 'utf-8');
      delete require.cache[require.resolve('./storage.json')];
      json = require("./storage.json");
  </code></pre>
  
  <p>With this code it does not write the file so when the require is done i end up with the same file and my json object ends up like this when i console.log it</p>
  
  <pre><code>{                                                                                                                                                    
      "users": {                                                                                                                                       
          "test": {},                                                                                                                                  
          "test1": {},                                                                                                                                 
          "push": "test2"                                                                                                                                
      }                                                                                                                                                
  }
  </code></pre>
  
  <p>Please do not recommend some external module to solve something has simple as this. Also if any one can point me to a in depth json documentation that gets straight to the point with what i'm try to do it would be appreciated</p>