title: Mongoose search from populated document
body: <p>I have this simplified Mongoose Schema:</p>
  
  <pre><code>    UserSchema = new db.Schema({
          _id      : { type: db.Schema.Types.ObjectId,
          name     : { type : String },
          friends  : [{ type: db.Schema.Types.ObjectId, ref: 'User' }]
      })
  </code></pre>
  
  <p>I want to get all <code>friends</code> with <code>name</code> that starts with a certain key string, let's say 'Pe' should return records 'Peter' and 'Petra'.</p>
  
  <p>So I tried populating the friends field first:</p>
  
  <pre><code>user.Model
              .findOne({
                  _id : loggedId,
              })
              .select('friends')
              .populate('friends', 'name')
              .exec(function(err, results) {
                  console.log(results);
              });
  </code></pre>
  
  <p>That will return <strong>all</strong> the user's friends and their <code>name</code> which is not really what I want. </p>
  
  <p>How do I return only those with a name that starts with certain characters?</p>
  
  <p>TIA.</p>