title: Iterating through javascript multidimensional array using key values
body: <p>I have the following multidimensional array setup:</p>
  
  <pre><code>array[key1][key2]["value1"] = "test";
  array[key1][key2]["value2"] = "test2";
  </code></pre>
  
  <p>I know to iterate in the first level you use:</p>
  
  <pre><code>for(key in  array)
  {
  
  }
  </code></pre>
  
  <p>How would I iterate through the second level? I was trying this without any success</p>
  
  <pre><code>for(key in array)
  {
      for(key2 in array[key])
      {
  
      }
  }
  </code></pre>
  
  <p>Also, does anyone know how I can sort by the second key? I hope I'm not overcomplicating this</p>