In mongodb, the equivalent of the sql operator is "like"
db.users.find({"shows": /m/})
Using nodejs / javascript I want to dynamically change a letter based on url paramater.
I tried
letter = req.params.letter;
db.users.find({"shows": '/' + letter + '/'})
This does not work, I think, because now slashes are interpreted differently.
source
share