how to check if an element is in an array mongodb code example
Example 1: mongodb array field contains
db.inventory.find( { tags: ["red", "blank"] } )
Example 2: mongodb array field contains
db.inventory.find( { tags: { $all: ["red", "blank"] } } )