title: Correct way to search for MongoDB entries by '_id' in Node
body: <p>I'm using <code>MongoDb</code> (as part of <code>MongoJS</code>) in <code>Node</code>. <a href="https://github.com/gett/mongojs" rel="noreferrer">Here is the documentation for MongoJS</a>.</p>
  
  <p>I'm trying to do a call within Node based on an entry's <code>_id</code> field. When using vanilla <code>MongoDB</code> from the console, I can do:</p>
  
  <p><code>db.products.find({"_id":ObjectId("51d151c6b918a71d170000c7")})</code></p>
  
  <p>and it correctly returns my entry. However, when I do the same thing in Node, like:</p>
  
  <pre><code>db.products.find({"_id": ObjectId("51d151c6b918a71d170000c7")}, function (err, record) {
      // Do stuff
  });
  </code></pre>
  
  <p>I get <code>ReferenceError: ObjectId is not defined</code>.</p>
  
  <p>What is the correct protocol for doing this? </p>