MongoDB equivalent of SQL "OR"
- by Matt
So, MongoDB defaults to "AND" when finding records. For example:
db.users.find({age: {'$gte': 30}, {'$lte': 40}});
The above query finds users = 30 AND <= 40 years old.
How would I find users <= 30 OR = 40 years old?