mongo cli check if any item in array is present code example
Example 1: mongodb array field contains
db.inventory.find( { tags: { $all: ["red", "blank"] } } )
Example 2: mongo array
db.inventory.find( { tags: ["red", "blank"] } )
db.inventory.find( { tags: { $all: ["red", "blank"] } } )
db.inventory.find( { tags: ["red", "blank"] } )