not in array query mongodb query code example Example: mongodb find element in array db.yourCollection.find( { array: "element" } )