title: How can I traverse this Javascript object?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/85992/how-do-i-enumerate-the-properties-of-a-javascript-object">How do I enumerate the properties of a javascript object?</a>  </p>
  </blockquote>
  
  
  
  <pre><code>{ 
         347655082: {
                      album:{
                              title: "A",
                              genre: "Pop",
                            }
          },
  
          347655083: {
  
                      album:{
                              title: "B",
                              genre: "Rock", 
                            }
          }
  }
  </code></pre>
  
  <p>Normally the "outside" key is the same, so I can easily target the nested objects.
  In the case the "outside" key is variable which can be anything.</p>
  
  <pre><code>albums = JSON.parse(json); //parse json storing it in albums
  </code></pre>
  
  <p>I cannot run a foreach on albums, say "albums has not method foreach".</p>
  
  <pre><code>albums.forEach(function(album, i){
  
  
  }
  </code></pre>