title: Classify mongoose schema arrays by date
body: <p>This is the Schema:</p>
  
  <pre><code>var userschema = new mongoose.Schema({
  
    user: String,
    messages: [{ 
  
                title: String,
                author: String,
                message: String,
                date: { type: Date, default: Date.now },
  
             }],
  
  });
  </code></pre>
  
  <p>I'm trying to show all the users' message in a single page ordered by date. I know how for example show all the messages of a specific user, but if I have multiple users, I don't know how to classificate their message by date using mongoose. Is there any way to do this...?</p>
  
  <p>Thank's advance!</p>