 <p>All answers are creating NEW arrays before projecting the final result : (<code>filter</code> and <code>map</code> creates a new array each) so basically it's creating <strong>twice</strong>.</p> <p>Another approach is <em>only to yield expected values</em> : </p> <p>Using iterator functions</p> <pre><code>function* foo(g) { for (let i = 0; i &lt; g.length; i++) { if (g[i]['images'] &amp;&amp; g[i]["images"].length) yield g[i]['images'][0]["name"]; } } var iterator = foo(data1) ; var result = iterator.next(); while (!result.done) { console.log(result.value) result = iterator.next(); } </code></pre> <p>This will <strong>not</strong> create any additional array and only return the expected values !</p> <p>However if you must return an array , rather than to do something with the actual values , then use other solutions suggested here.</p> <p><a href="https://jsfiddle.net/remenyLx/7/" rel="nofollow">https://jsfiddle.net/remenyLx/7/</a></p>