mongodb checkl if array has 2 elements code example Example: mongodb find element in array db.yourCollection.find( { array: "element" } )