title: Return all fields MongoDB Aggregate
body: <p>I tried searching on here but couldn't really find what I need. I have documents like this:</p>
  
  <pre><code>{
      appletype:Granny,
      color:Green,
      datePicked:2015-01-26,
      dateRipe:2015-01-24,
      numPicked:3
  },
  
  {
      appletype:Granny,
      color:Green,
      datePicked:2015-01-01,
      dateRipe:2014-12-28,
      numPicked:6
  }
  </code></pre>
  
  <p>I would like to return only those apples picked latest, will all fields. I want my query to return me the first document only essentially. When I try to do:</p>
  
  <pre><code>db.collection.aggregate([
      { $match : { "appletype" : "Granny" } },
      { $sort : { "datePicked" : 1 } },
      { $group : { "_id" : { "appletype" : "$appletype" },
          "datePicked" : { $max : "$datePicked" } },
  ])
  </code></pre>
  
  <p>It does return me all the apples picked latest, however with only appletype:Granny and datePicked:2015-01-26. I need the remaining fields. I tries using $project and adding all the fields, but it didn't get me what I needed. Also, when I added the other fields to the group, since datePicked is unique, it returned both records.</p>
  
  <p>How can I go about returning all fields, for only the latest datePicked?</p>
  
  <p>Thanks!</p>