query inside an array moongoose code example Example: mongoose query using an arry var query = PUser.find({'userID': {$in:array}});