Back
Example:
> db.stuff.save({"foo":"bar"}); > db.stuff.find({"foo":"bar"}).count(); 1 > db.stuff.find({"foo":"BAR"}).count();0
> db.stuff.save({"foo":"bar"});
> db.stuff.find({"foo":"bar"}).count();
1
> db.stuff.find({"foo":"BAR"}).count();
0
Yes, it is possible to make a case-insensitive query for that you can use a regex.
Example code for that is as follows:-
db.stuff.find( { foo: /^bar$/i } );
31k questions
32.8k answers
501 comments
693 users