I have the following Collection:
{ id: 23423-dsfsdf-32423, name: Proj1, services: [ { id:sdfs-24423-sdf, name:P1_Ser
You need to group on null _id so that all services get grouped in single document. Also $unwind the services array before grouping, else group will give you array of arrays
null
_id
services
$unwind
db.project.aggregate( {$unwind: '$services'}, {$group: {_id:null, services: {$push: '$services'}}} )