diff options
author | Arno <arnotixe@gmail.com> | 2024-01-23 06:29:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 12:29:31 +0100 |
commit | 3ae5f34a91e8db6b73b5daea0d378337337ca4a8 (patch) | |
tree | 4b384aa5b130bfe273b60c02a1b5432ffd092bb5 /mongodb.html.markdown | |
parent | f8c0fd4aeb7697ac1a6832d13e464cda8c982a37 (diff) |
Update mongodb.html.markdown (#4358)
fixed in: -> $in: and added $nin: too
Diffstat (limited to 'mongodb.html.markdown')
-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 /////////////////// |