title: Finding a MongoDB document by different types with Mongoskin
body: <p>This is an example of document that I have in my MongoDB:</p>
  
  <pre><code>{
      "_id": ObjectId('5525039895884d66710d0fc3'),
      "prid": "63527",
      "data": {
          "sku": "HF22-81639",
          "name": "Product Test",
          "ean": "8763900872512",
          "description": "This product is my first test",
      }
  }
  </code></pre>
  
  <p>I want to make several search methods, where the search criteria are search by SKU, EAN or PRID. I created the methods but do not work, this is the example of one of the methods that I created and it does not work, just find the first document of my database but without any search criteria.</p>
  
  <p>This search for "_id" if it works perfectly:</p>
  
  <pre><code>// GET - "_id"
  app.get("/:id", function(req, res, next) {
      req.collection.findOne({
          _id: id(req.params.id)
      }, function(e, result) {
          if(e) return next(e);
          res.send(result);
      });
  });
  </code></pre>
  
  <p>This search for "sku" does not work (this is where I need help):</p>
  
  <pre><code>// GET - "sku"
  app.get("/sku/:id", function(req, res, next) {
      req.collection.findOne({
          sku: id(req.params.sku)
      }, function(e, result) {
          if(e) return next(e);
          res.send(result);
      });
  });
  </code></pre>