title: Concat all the arrays from different objects in mongoDB
body: <p>i 'am starting discovering <code>mongodb</code> , i'd like to concat the <code>images</code> to be in the same array </p>
  
  <p>The example: </p>
  
  <pre><code>{user_id:01, images:[10,20,30,40,50]}
  {user_id:02, images:[11,22,33,44,55]}
  {user_id:03, images:[12,22,32,42,52]}
  {user_id:04, images:[13,23,33,43,53]}
  </code></pre>
  
  <p>The result wanted:</p>
  
  <pre><code> images:[10,20,30,40,50,11,22,33,44,55,12,22,32,42,52,13,23,33,43,53]
  </code></pre>
  
  <p>i found through the Doc the <code>$aggreagation</code> solution , here is what i have tried:</p>
  
  <pre><code>  db.results.aggregate([{ $project: { images: { $concatArrays: ["$images"]}}}])
  </code></pre>
  
  <p>but it just concat the array from the same object , in my case as i mentioned in <code>result wanted</code>to concat all the array having the name <code>images</code> from different objects as one</p>