mongodb array field contains
db.inventory.find( { tags: { $all: ["red", "blank"] } } )
mongodb array field contains
db.inventory.find( { tags: { $all: ["red", "blank"] } } )
mongo get array that only contains value
db.collection.find({
'$expr': {
'$setEquals': ['$toys', ['doll', 'car']]
}
})
mongo get array that only contains value
db.collection('col1').find("values":{"$not":{"$elemMatch":{"name":{$nin:['val1', 'val2']}}}}})
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us