how to use $push: '$$ROOT'

121 views
Skip to first unread message

Ram Odedara

unread,
Nov 7, 2017, 8:49:43 AM11/7/17
to ReactiveMongo - http://reactivemongo.org
hi 
i am using reactivemongo 12.6 and i want to push whole result in a variable any body know how to use this group query in reactivemongo 

{"$group":{
    "_id":null,
     "count":{$sum:1},
    "result":{$push: '$$ROOT'}
    }}

Cédric Chantepie

unread,
Nov 7, 2017, 3:30:52 PM11/7/17
to ReactiveMongo - http://reactivemongo.org
Group is an aggregation stage, whose usage can be seen in the documentation: http://reactivemongo.org/releases/0.12/documentation/advanced-topics/aggregation.html#group
Reply all
Reply to author
Forward
0 new messages