title: Parse 2 dimensional JSON array in Javascript
body: <p>I have a two dimensional JSON array where each element contains several attributes. The example below is intentionally simplified:</p>
  
  <pre><code>var map_data = { "1":
                        {"1":{"name":"aa"},"2":{"name":"bb"}},
                   "2":
                        {"1":{"name":"cc"},"2":{"name":"dd"}}
                 };
  </code></pre>
  
  <p>I try to parse the data but <code>.length</code> doesn't work:</p>
  
  <pre><code>for(x=1; x&lt;=map_data.length; x++) { 
      for(y=1; y&lt;=map_data[x].length; y++) {
          // CODE 
      }
  }
  </code></pre>
  
  <p>Many, many thanks!</p>