title: How to loop through an array of arrays using jQuery or JavaScript?
body: <p>I have a json array like this</p>
  
  <pre><code>var data = key: [
      {
          arr1: [
              {value: 1},
              {value: 2},
              {value: 3},
          ]
      },
      {
          arr2: [
              {value: 1},
              {value: 2},
              {value: 3},
          ]
      },
      {
          arr3: [
              {value: 1},
              {value: 2},
              {value: 3},
          ]
      }
  ]
  </code></pre>
  
  <p>I wanted to loop through <code>key</code> which is 3 times, and inside the key loop I wanted loop again through each of the elements inside <code>key</code>.</p>
  
  <p>First I tried <code>$.each</code> which works fine for key array. And inside the each function I tried to get the key values using <code>Object.key(this)</code> inside the loop which returned me the names</p>
  
  <pre><code>arr1, arr2, arr3
  </code></pre>
  
  <p>But I'm not able to loop through the names I got.</p>
  
  <pre><code>$.each(data, function(i, e) {
      Object.keys(this).each(function(index, element) {
          console.log(element);
      })    
  })
  </code></pre>
  
  <p>I don't know if this is the right way of doing it, when I tried doing it this was. I got an error telling <code>.each</code> is not a function.</p>
  
  <p>Any help will be much appreciated.</p>