title: Mongodb aggregate and return multiple document value
body: <p>Assuming I have the following JSON structure I want to group by gender and want to return multiple document values on in the same field:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>[
      {
          "id": 0,
          "age": 40,
          "name": "Tony Bond",
          "gender": "male"
      },
      {
          "id": 1,
          "age": 30,
          "name": "Nikki Douglas",
          "gender": "female"
      },
      {
          "id": 2,
          "age": 23,
          "name": "Kasey Cardenas",
          "gender": "female"
      },
      {
          "id": 3,
          "age": 25,
          "name": "Latasha Burt",
          "gender": "female"
      }
  ] 
  </code></pre>
  
  <p>Now I know I can do something like this but I need to join both age and name into one field</p>
  
  <pre class="lang-js prettyprint-override"><code>.aggregate().group({ _id:'$gender', age: { $addToSet: "$age" }, name: { $addToSet: "$name"}})
  </code></pre>