Wednesday 2 April 2014

Using LIKE on nested array in mongoDB using nodeJS

db.collectionName.aggregate({"$unwind": "$nestedRootColumn"}, {"$match": {"columnToSearchOn":/^text/i}}, {"$project": {"_id": 0, "columnToSearchOn": 1}})

No comments:

Post a Comment