title: JSON Object containing Array
body: <p>I have JSON,like,</p>
  
  <pre><code>var jsondata = {
    "an_array" : [[2,4],[1,2]]
  } 
  </code></pre>
  
  <p>With JavaScript, I want to use a for loop to go through each element of the array in the array, like,</p>
  
  <pre><code>var grab_array = jsondata.an_array;
  for (i = 0; i &lt; grab_array.length; i++) {
  
   grab_array[i][0]; //doing stuff
  
  }
  </code></pre>
  
  <p>However, and I know this is probably some serious noob stuff, when I run typeof() on grab_array, it says it is an object and has a length of 0. What should I be doing?</p>