title: Find all Mongo documents for which the max value in an array matches a query
body: <p>Given a document structure such as this:</p>
  
  <pre><code>{
     values: [
        { value: 10 },
        { value: 20 },
        { value: 30 }
     ]
  }
  </code></pre>
  
  <p>I would like to search for all documents for which the <strong>maximum</strong> value in the array matches a query.</p>
  
  <p>eg. If I search for all documents for which the maximum less than 25 then the example above would not match since 30 > 25.</p>
  
  <p>How can I do this?</p>