How to loop through JSON per group
<p>I'm pretty new to JavaScript and started having trouble with JSON.</p>

<p>I have a object like so:</p>

<pre><code>var users =  [
  { "firstName":"John" , "lastName":"Doe" },
  { "firstName":"Anna" , "lastName":"Smith" },
  { "firstName":"Peter" , "lastName":"Jones" }
]
</code></pre>

<p>Is there anyway I can do a jQuery <code>$.each</code> selector to do something with each pair without knowing how many indexes there are?</p>

<p>Like so:</p>

<pre><code>$.each(obj.firstname) {
  // Do stuff for John then Anna then Peter
}
</code></pre>
