Database

[{title:"A",section:"section1",description:"a",customer:1,documentKey:"A"},{title:"A",section:"section2",description:"a",customer:1,documentKey:"A"}]

Query

db.collection.aggregate([{$match:{customer:1}},{$group:{_id:"$section",customers:{$push:"$$ROOT"}}},{$group:{_id:null,sections:{$push:{k:"$_id",v:"$customers"}}}},{$replaceRoot:{newRoot:{$arrayToObject:"$sections"}}}])

Result