title: How to filter a query string with comparison operators in Express
body: <p>If I have a resource in the database, I know I can use the <code>mongodb</code> npm package in my express app to filter something with <code>$gt</code>, <code>$lt</code>, etc. to only receive back the values based on my desired filter.</p>
  
  <p>I also know how to use <code>req.query</code> in combination with <code>mongodb</code> to retrieve results of my query strings when they're <em>equal</em> to something (URL: <code>http://localhost:3000/fruit?type=apple</code>, Express/mongodb: <code>collection.find(req.query)...</code>).</p>
  
  <p>How do I make it so the query string indicates I want only the values that are greater than or less than something? If I just wanted "equal to", I would just pass it in as another query parameter (<code>http://localhost:3000/fruit?type=apple&amp;price=1</code>), but what if I want all fruits whose prices are less than 1?</p>