title: How to filter only some rows of an array inside a document?
body: <p>I have a MongoDB collection of documents, using a schema like this:</p>
  <pre><code>var schema = new Schema({
    name: String,
    images: [{
      uri: string,
      active: Boolean
    }]
  });
  </code></pre>
  <p>I'd like to get <strong>all</strong> documents (or filter using some criteria), but retrieve - in the <code>images</code> array - <strong>only</strong> the items with a specific property (in my case, it's <code>{active: true}</code>).<br />
  This is what I do now:</p>
  <pre><code>db.people.find( { 'images.active': true } )
  </code></pre>
  <p>But this retrieves only documents with at least one image which is active, which is not what I need.</p>
  <p>I know of course I can filter in code after the find is returned, but I do not like wasting memory.
  Is there a way I can filter array items in a document using mongoose?</p>