Custom Search

Monday, May 6, 2019

mongodb Checking if a field contains a string

db.media.find({city:/HAD/})
db.media.find({'city' : {'$regex' : '.*HAD.*'}});

No comments:

Post a Comment