not in query mongodb code example
Example: mongodb not in
#all documents whose country field value is not neither Portugal or Spain
query = db.collection.find({
"country" : { '$nin': [
'Portugal',
'Spain']
}
})
#all documents whose country field value is not neither Portugal or Spain
query = db.collection.find({
"country" : { '$nin': [
'Portugal',
'Spain']
}
})