Answers for "how to find the value of a field in mongodb"

Go
3

mongodb find field based on variable

var name = req.params.name;
var value = req.params.value;
var query = {};
query[name] = value;
collection.findOne(query, function (err, item) { ... });
Posted by: Guest on May-25-2020

Code answers related to "how to find the value of a field in mongodb"

Browse Popular Code Answers by Language