title: Return each last document for a common ID
body: <p>I have a <code>messages</code> collection.  Performing</p>
  
  <pre><code>Message.find({}).sort({ created_at: -1 }).exec((err, msg) =&gt; {}
  </code></pre>
  
  <p>returns all documents by date (most recent document returns first).  Each <code>messages</code> document contains a <code>conversations</code> ID.  Here is a short sample of what this query returns:</p>
  
  <pre><code>[ { _id: 59867e2fba6aa11b3ea7142a,
      message: 'Fourth message.',
      created_at: 2017-08-06T02:25:51.589Z,
      unread: true,
      __v: 1,
      conversations: [ 59867c2c3853621b294b394f ] },
    { _id: 59867dd7ba6aa11b3ea71429,
      message: 'Second message.',
      created_at: 2017-08-06T02:24:23.888Z,
      unread: false,
      __v: 1,
      conversations: [ 59867dbcba6aa11b3ea71427 ] },
  { _id: 59867dbcba6aa11b3ea71428,
      message: 'First message.',
      created_at: 2017-08-06T02:23:56.480Z,
      unread: false,
      __v: 1,
      conversations: [ 59867dbcba6aa11b3ea71427 ] } ]
  </code></pre>
  
  <p>Multiple messages belong to a single conversation (such as the last two message documents here).  So, conversation ID <code>59867dbcba6aa11b3ea71427</code> appears multiple times.</p>
  
  <p>I want to return the first message document for each conversation.  So, <code>'Fourth message.'</code> will be returned, and so will <code>'Second message.'</code> because they're part of different conversations.</p>
  
  <p>But, <code>'First message.'</code> should not be returned because it is part of the same conversation as <code>'Second message.'</code> (they're both part of conversation ID <code>59867dbcba6aa11b3ea71427</code>.</p>
  
  <p>How do I accomplish this?</p>