title: MongoDB version 4.2 get field value from aggregation function that isn't one of the aggregation fields
body: <p>I have a collection with documents that has the following fields: Name,Date,City,Value
  I created an aggregation where the group by is on the Name for getting the max(date).
  From the results I need the field Value (but as you can see this field isn't in the aggregation so I don't really know how can I get it).</p>
  <pre><code>db.direct_client.aggregate([ 
  {
      $group : {
         _id : {&quot;name&quot;:&quot;$name&quot;},
         count: { $sum: 1 },
         max_date:{$max:&quot;$created_date&quot;}
      }
  }
  ])
  </code></pre>
  <p>Can someone guide me how to get this data</p>