title: How to concatenate arrays from multiple documents in MongoDB?
body: <p>Let's say I have a collection called 'people' with the following documents:</p>
  
  <pre><code>{
      "name": "doug",
      "colors": ["blue", "red"]
  }
  
  {
      "name": "jack",
      "colors": ["blue", "purple"]
  }
  
  {
      "name": "jenny",
      "colors": ["pink"]
  }
  </code></pre>
  
  <p>How would I get a concatenated array of all the <code>colors</code> subarrays, i.e.?</p>
  
  <pre><code>["blue", "red", "blue", "purple", "pink"]
  </code></pre>