Mongo query to filter out the elements inside an array of objects

There is db structure were the value is array of objects like

{
 key : [
  {
   retrive : false
  },
  {
   retrive : true
  }
 ]
}

And i want to query only the objects were 'retrieve' key is set to true.

  db.collection.find({'key.$.retrive':true},function(err,res){


   });