title: Mongodb: How to return just the embedded document with aggregation framework
body: <p>This is the doc structure where offers and bids is sub-documents. I use mongoosejs as ORM.</p>
  
  <pre><code>var user = {
      name : 'polk',
      offers: [{
          title: '1',
          tags: ['a', 'b', 'c'],
          bids: [{
              _id: 1      
              name: 'jose', 
              age: 18
          }, {
              _id: 2
              name: 'carlos', 
              age: 19
          }]
      },{
          title: '2',
          tags: ['d', 'e', 'f'],
          bids: [{
              _id: 3
              name: 'gomes', 
              age: 21
          }, {
              _id: 4
              name: 'fernando', 
              age: 31
          }]
      }]
  };
  </code></pre>
  
  <p>What i need? This sub-document:</p>
  
  <pre><code>{
      _id: 4
      name: 'fernando', 
      age: 31
  }
  </code></pre>
  
  <p>Using? Aggregation framework.</p>