Structuring a JSON object
<p>I have a JSON object say:</p>

<pre><code>{
   [
      {
         'name':'personA',
         'age':'30',
         'description':'some-text'
      },
      {
         'name':'personB',
         'age':'40',
         'description':'some-text'
      }
   ]
}
</code></pre>

<p>This issue is I need to be able to access each var by name, for Example:</p>

<pre><code>people.PersonA.age:
</code></pre>

<p>so Instead:</p>

<pre><code>people =

{
   'personA':{
      'age':'30',
      'description':'some-text'
   },
   'personB':{
      'age':'40',
      'description':'some-text'
   }
}
</code></pre>

<p>But then I cannot generate a list of names</p>

<p>What would be the best structure for this? I need to be able to loop though the names and quickly access the age etc using the name as a key</p>