title: Array of objects vs Object of Objects
body: <p>The issue is to decided the trade offs between following notations:</p>
  
  <p><strong>JSON based</strong>:</p>
  
  <pre><code>"users": {
      "id1": {
          "id": "id1",
          "firstname": "firstname1",
          "lastname": "lastname1"
      },
      "id2": {
          "id": "id2",
          "firstaame": "firstname2",
          "lastname": "lastname2"
      }
  }
  </code></pre>
  
  <p><strong>Array Based</strong>:</p>
  
  <pre><code>users: [
      {
          "id": "id",
          "key2": "value2",
          "key3": "value3"
      },
      {
          "id": "id",
          "key2": "value2",
          "key3": "value3"
      }
  ]
  </code></pre>
  
  <p>Relating to <a href="https://stackoverflow.com/questions/24882985/array-of-objects-vs-nested-object">this</a> post on the same issue, I have decided (on front end) to use the JSON object notation instead of array of objects as it suits my requirements and better performance and less code in the browser.</p>
  
  <p>But the problem is that the list itself is not static. By this I mean the list is being generated i.e. fetched/stored from DB (NoSQL) and created for new entries through a Java API at the server. I am not able to decide on which notation should I use at the back end (which eventually will also affect the UI too). </p>
  
  <p>Any thoughts/suggestion about performance, maintainability or scalability is appreciated.</p>