title: How to add key/value pair in hash with ruby laungage
body: <p>I am using ruby 2.0.0, At present i have one demo.json file with following hash values:</p>
  
  <pre><code>{
     "users": 
     {
        "@jon" : 
        {
          "name": "pradeep",
          "Email": "pradeep@yahoo.com",
          "area": "@jon",
          "location": "@newyork"
        },
  
        "@smith" : 
       {
        "name": "Smith",
        "Email": "Joe@yahoo.com",
        "area": "@smith",
        "location": "@lverginia"
       }
    }
  }
  </code></pre>
  
  <p>now i am taking json values in object using following codes:</p>
  
  <pre><code>require 'json'
  json = File.read('demo.json')
  obj = JSON.parse(json)
  </code></pre>
  
  <p>here @jon and @smith is usernames, Now i wants to take usernames via keyboard inputs and than all the other values inside of @jon with same keyboard.</p>
  
  <p>Suppose i have one new user @david and his other values are like:</p>
  
  <pre><code>    "name": "pradeep",
      "Email": "pradeep@yahoo.com",
      "area": "@jon",
      "location": "@newyork"
  </code></pre>
  
  <p>i wants to add this in above demo.json file without remove other values, Any idea how can i do?</p>
  
  <p>I tried to do this in this way:</p>
  
  <pre><code>obj["users"]
  </code></pre>
  
  <p>But as i got username via input so i cant hard code username after user key on "obj" object, Hope this make sense..</p>