title: Merge arrays to one array after filtering
body: <p>I've got array of objects, where I take only locations array. My goal is to merge these locations array to one array, however I fail to do so and get empty array. This is how I do it:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let results = [{
      id: '1',
      locations: ['aaaa', 'bbbbbb', 'cccccc']
    },
    {
      id: '2',
      locations: []
    },
    {
      id: '3',
      locations: ['ddd', 'aaadsad', 'sefd']
    },
    {
      id: '4',
      locations: ['ffff', 'eeee', 'sfdsfsd']
    },
  ];
  const locationIds = [].concat.apply([], ...results.filter(s =&gt; s.locations &amp;&amp; s.locations.length &gt; 0).map(({
    locations
  }) =&gt; ({
    locations
  })));
  
  console.log(locationIds);</code></pre>
  </div>
  </div>
  </p>
  
  <p>what I am doing wrong here? The result should be 
  <code>['aaaa', 'bbbbbb', 'cccccc', 'ddd', 'aaadsad', 'sefd', 'ffff', 'eeee', 'sfdsfsd'];</code></p>