Answers for "group with root"

0

group with root

db.collection.aggregate([{
    $group: {
        _id: '$history',
        items: {$push: '$$ROOT'}
    }
}])
Posted by: Guest on October-05-2021

Browse Popular Code Answers by Language