title: javascript using forEach for nested arrays
body: <p>If I have a <code>nested array</code> as follows:</p>
  
  <pre><code>var attendees={attendees :[{name: John},{name: Terry}]}
  </code></pre>
  
  <p>how do I loop through the names using the <code>forEach</code> function? I have tried:</p>
  
  <pre><code>attendees.forEach(function(attendees){
      console.log(attendees.name):
  });
  </code></pre>
  
  <p>but it does not loop through the subarrays and just gives me:</p>
  
  <pre><code>[{name: John},{name: Terry}]
  </code></pre>
  
  <p>Appreciate the help!</p>