title: Trying to get message history from a db collection( mongodb)
body: <p>I'm back with my chat system with history, using mongodb, I can't have let's say about the last 20 messages from the db colection, I'm quite sure it is about some filtering to add into the find() routine, but I don't know where  and how to do that here is my piece of code :</p>
  
  <pre><code>MongoClient.connect('mongodb://127.0.0.1:27017/gt-chat', function(err, db) {
  if(err) throw err;
  
  var collection = db.collection('gt-chat');
  
  console.log("******************************Printing docs from Cursor Each")
  
  collection.find().each(function(err, doc) {
   console.log(doc);
  if(doc != null) {
  console.log("Doc from Each ");
  console.dir(doc);
   }
  });
  });
  </code></pre>
  
  <p>this code is showing :</p>
  
  <hr>
  
  <p>{ _id: 5488473660eda4ac251d6688,
    message: 'The quick brown fox jumps over the lazy dog' }
  and I don't need the _id value, I only want the last 20 messages as result.
  Hoping to be clear enough,
  Thanks in advance for your help on this ! :)</p>