title: How to use a variable as a field name in mongodb-native findOne()?
body: <p>I have this data in mongodb:</p>
  
  <pre><code>{  
      "name": "Amey",
      "country": "India",
      "region": "Dhule,Maharashtra"
  }
  </code></pre>
  
  <p>and I want to retrieve the data while passing a field name as a variable in query.</p>
  
  <p>Following does not work:</p>
  
  <pre><code>var name = req.params.name;
  var value = req.params.value;
  collection.findOne({name: value}, function(err, item) {
      res.send(item);
  });
  </code></pre>
  
  <p>How can I query mongodb keeping both field name and its value dynamic?</p>