You can use $in or $nin for “not in”
Example …
> db.people.find({ crowd : { $nin: ["cool"] }});
I put a bunch more examples here: http://learnmongo.com/posts/being-part-of-the-in-crowd/
More Related Contents:
- Possibility of duplicate Mongo ObjectId’s being generated in two different collections?
- How to remove a field completely from a MongoDB document?
- Store images in a MongoDB database
- MongoDB vs. Cassandra [closed]
- Find duplicate records in MongoDB
- Best practice to maintain a mgo session
- How do you rename a MongoDB database?
- Where does mongodb stand in the CAP theorem?
- How do you query for “is not null” in Mongo?
- MongoDB update with condition
- How to stop insertion of Duplicate documents in a mongodb collection
- Mongodb aggregation $group, restrict length of array
- Is mongodb running?
- Does MongoDB support floating point types?
- MongoDB normalization, foreign key and joining
- MongoDB Single Document size limit is 16MB
- Get a document in MongoDB without specifying collection
- How to use mongoimport to import csv
- MongoDB wildcard in the key of a query
- How to create a DB for MongoDB container on start up?
- How to access a preexisting collection with Mongoose?
- MongoDB field order and document position change after update
- MongoDB Full and Partial Text Search
- Difference between count() and find().count() in MongoDB
- How do I make case-insensitive queries on Mongodb?
- Mongo sort on a calculated condition
- Couldn’t connect to server 127.0.0.1:27017
- Dealing with schema changes in Mongoose
- MongoDB – The argument to $size must be an Array, but was of type: EOO / missing
- How to check if an array field contains a unique value or another array in MongoDB?