title: sort json object in javascript
body: <p>For example with have this code:</p>
  
  <pre><code>var json = {
      "user1" : {
          "id" : 3
      },
      "user2" : {
          "id" : 6
      },
      "user3" : {
          "id" : 1
      }
  }
  </code></pre>
  
  <p>How can I sort this json to be like this -</p>
  
  <pre><code>var json = {
      "user3" : {
          "id" : 1
      },
      "user1" : {
          "id" : 3
      },
      "user2" : {
          "id" : 6
      }
  }
  </code></pre>
  
  <p>I sorted the users with the IDs..
  <br />
  I don't know how to do this in javascript..</p>