title: how to group by in mongoose
body: <p>Let's say I have a Collection with a <code>field</code> name and only &quot;Sally&quot; and &quot;Bob&quot; names exist. I want to group my results by this value. I'm currently getting my results and then using <code>underscore</code> to perform the <code>group</code>. But I should be able to do this with an <code>aggregate</code>.
  The following is my code</p>
  <pre><code>  const names = ['Bob', 'Sally'];
    const docs = Collection.find({name: { $in: names}}, { fields: { name:1, age:1}, sort: { name:-1 } }).fetch();
  
    //How can I do this part in the query above
    const { Bob, Sally } = _.groupBy(docs, &quot;name&quot;);
  </code></pre>