check if atleast one elem has attribute in loc array mongodb code example Example: mongodb find element in array db.yourCollection.find( { array: "element" } )