title: $.each() with nested array
body: <p>First of all, forgive me if I didn't identify the right type of array, however I can't seem to figure this out.</p>
  
  <p>I'm trying to run this array in query:</p>
  
  <pre><code>var myArray = {"artists":[{
              "a1":"Adam Sandler",
              "a2":"Adam Lambert",
              "a3":"Avril Levine",
              "a4":"Backstreet Boys",
              "a5":"Blackstreet",
              "a6":"Black Eye Peas",
              "a7":"Cool and the Gang",
              "a8":"Chicago",
              "a9":"Charlie Manson"
  
          }],
          "songs":[{
              "s1":"Grow Old With You",
              "s2":"Whatdaya Want From Me",
              "s3":"Yea yea",
              "s4":"Quit Playing Games With My Heart",
              "s5":"No Digity",
              "s6":"Meet Me Half way",
              "s7":"Doo wa ditty",
              "s8":"Fight for your honor",
              "s9":"Charlies Song"
          }],
          "genre":[{
              "g1":"Pop",
              "g2":"Pop",
              "g3":"Alternative",
              "g4":"R &amp; B",
              "g5":"R &amp; B",
              "g6":"Hip-Hop",
              "g7":"Funk",
              "g8":"Soft Rock",
              "g9":"Rock"
          }]};
  </code></pre>
  
  <p>When I click a button (say for title) I don't know how to have it automatically go through the array. This is what I have for my button:</p>
  
  <pre><code>                $.each(myArray.songs, function(e,i){
                      console.log("e:"+e+" - i:"+i+" - "+myArray.songs[e].i);
  
                  });
  </code></pre>
  
  <p>This does work, however when it reaches to the console.log, this is what I get:</p>
  
  <blockquote>
    <p>e:0 - i:[object Object] - undefined</p>
  </blockquote>
  
  <p>I don't know how to get "i" to work, it always gives me [Object Object]. I replace I with the actual id in the array, it works.</p>
  
  <p>Thank you.</p>