Update mongodb.html.markdown (#4358)

fixed in: -> $in: and added $nin: too
This commit is contained in:
Arno 2024-01-23 06:29:31 -05:00 committed by GitHub
parent f8c0fd4aeb
commit 3ae5f34a91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -264,8 +264,9 @@ db.engineers.find({ $lte: { age: 25 }})
db.engineers.find({ $eq: { age: 25 }}) db.engineers.find({ $eq: { age: 25 }})
db.engineers.find({ $ne: { age: 25 }}) db.engineers.find({ $ne: { age: 25 }})
// Find all that match any element in the array // 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: { $in: [ 20, 23, 24, 25 ]}})
db.engineers.find({ age: { $nin: [ 20, 23, 24, 25 ]}})
//////////////// Logical Operators /////////////////// //////////////// Logical Operators ///////////////////