title: Finding an Embedded Document by a specific property in Mongoose, Node.js, MongodDB
body: <p>For this app, I'm using Node.js, MongoDB, Mongoose &amp; Express</p>
  
  <p>So I have a Param Object that contains an array of Pivots, and I want to read certain data from the pivots as outlined below </p>
  
  <pre><code>---in models.js-------------------------
      var Pivot = new Schema({
      value : String
    , destination : String
    , counter : Number
   });
  
  
  var Param = new Schema({
      title : String
    , desc : String
    , pivots : [Pivot]
  });
  
  
  ------------- in main.js --------------
  
  var Param = db.model('Param');
  
  
  app.get('/:title/:value', function(req, res){
      Param.findOne({"title":req.param('title')}, function(err, record){
             console.log(record.pivots);
             record.pivots.find({"value":req.param('value')}, function(err, m_pivot){
                      pivot.counter++;
                      res.redirect(m_pivot.destination);
             });
             record.save();
      });
  });
  </code></pre>
  
  <p>I know that the code works until console.log(record.pivots), since  i got a doc collection with the right pivot documents inside. </p>
  
  <p>However, there does not seem to be a find method to let me match an embedded document by the 'value' property defined in the schema. Is it possible to search through this array of embedded documents using .find() or .findOne() , and if not, is there some easy way to access it through mongoose?</p>