mongoose array query code example
Example 1: mongoose query using an arry
var query = PUser.find({'userID': {$in:array}});
Example 2: find string element in an array mongodb
db.articles.find({
"stock.country" : "01",
"stock.warehouse.code" : "02"
}).pretty();
Example 3: mongo array
db.inventory.find( { tags: ["red", "blank"] } )