mongodb find get field as array code example
Example 1: mongodb find element in array
db.yourCollection.find( { array: "element" } )
Example 2: find string element in an array mongodb
db.articles.find({
"stock.country" : "01",
"stock.warehouse.code" : "02"
}).pretty();