Iterate through array of objects and print out property value : <p>If I have this:</p>

<pre><code>  myArr = [{name: 'rich', secondName: 'james'}, {name: 'brian', secondName: 'chris'}];

  mySecondArr = [];
</code></pre>

<p>how can I loop over this so that <code>mySecondArr = ['rich', 'brian']</code></p>

<p>I was thinking of doing something like:</p>

<pre><code>for (var key in myArr){
    if (Object.hasOwnProperty(name){
      mySecondArr.push(name[value])
}
</code></pre>

<p>I know that is pseudo code but cant quite thing of the syntax for doing this as simply as possible</p>

<p>NO JQUERY PLEASE</p>
