title: How can gather all the results of several findById searches in a single array?
body: <p>Consider the code:</p>
  
  <pre class="lang-js prettyprint-override"><code>const id=aux[0].healthyTissue[0];
  const aux4 = await Hidden.findById(id).populate(
      "children"
  );
  </code></pre>
  
  <p>As you may have noticed, <code>aux</code> is an array and so is <code>aux[i].healthyTissue[0]</code>.</p>
  
  <p>Problem: <strong>I want to gather all the information</strong> <em>in a single array called <code>aux4</code></em>, as I am doing for index equal 0, <em>I want an automatic way to search inside all the arrays</em>. </p>
  
  <p>I have tried something like <code>ForEach</code> and <code>map</code>, with no success, I cannot make it wait for the result, it keeps coming empty on the following <code>res.json</code>  I thought about <code>pipe</code>, however, I could make it work on this case. </p>
  
  <p>Obs. the code showed works, but I want to go through all the elements, gather them in a single array, and return in a <code>res.json</code></p>