From 3ae5f34a91e8db6b73b5daea0d378337337ca4a8 Mon Sep 17 00:00:00 2001 From: Arno Date: Tue, 23 Jan 2024 06:29:31 -0500 Subject: [PATCH] Update mongodb.html.markdown (#4358) fixed in: -> $in: and added $nin: too --- mongodb.html.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mongodb.html.markdown b/mongodb.html.markdown index 306f361cdf..eeb70265fe 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 ///////////////////