contains mongodb code example
Example 1: contains mongo-query string
db.users.findOne({"username" : {$regex : ".*son.*"}});
Example 2: mongodb find element in array
db.yourCollection.find( { array: "element" } )
db.users.findOne({"username" : {$regex : ".*son.*"}});
db.yourCollection.find( { array: "element" } )