title: return subdocuments from array of id's with mongoose
body: <p>I currently have an array of multiple id's which reference subdocuments. What I need to do is search collections for these Id's and return the information associated with them.</p>
  
  <pre><code>var ids =['58c2871414cd3d209abf4fc0','58c2871414cd3d209abf5fc0'];
  User.aggregate(
        {$unwind : "$position"},
        {$match:{'_id': { $in: [
  
       // need to reference the ids array here
  
      ]}
  }
  }, function(err, docs){
       console.log(docs);
  });
  
  });
  </code></pre>
  
  <p>My user schema is as follows:</p>
  
  <pre><code>var User = new Schema({
  id: String,
  name: String,
  position: [{
            _id:String,
            title: String,
            location: String,
            start: String,
            term:Number,
            description:String,
            date: {type: Date, default: Date.now},
  </code></pre>
  
  <p>So basically what I need to do is return the entire Position subdocument if it matches an id from the array. Any Ideas?</p>