diff options
-rw-r--r-- | mongodb.html.markdown | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mongodb.html.markdown b/mongodb.html.markdown index 306f361c..eeb70265 100644 --- a/mongodb.html.markdown +++ b/mongodb.html.markdown @@ -264,8 +264,9 @@ db.engineers.find({ $lte: { age: 25 }}) db.engineers.find({ $eq: { age: 25 }}) db.engineers.find({ $ne: { age: 25 }}) -// Find all that match any element in the array -db.engineers.find({ age: ${ in: [ 20, 23, 24, 25 ]}}) +// Find all that match any element in the array, or not in the array +db.engineers.find({ age: { $in: [ 20, 23, 24, 25 ]}}) +db.engineers.find({ age: { $nin: [ 20, 23, 24, 25 ]}}) //////////////// Logical Operators /////////////////// |