mongoose get elements that contain substring code example
Example: mongoose get elements that contain substring
Books.find(
{ "authors": { "$regex": "Alex", "$options": "i" } },
function(err,docs) {
}
);
Books.find(
{ "authors": { "$regex": "Alex", "$options": "i" } },
function(err,docs) {
}
);