Database

db={"posts":[{id:1,title:"my title",content:"bla bla bla"}],"likes":[{post_id:1,comment_id:null,user_id:"123",},{post_id:1,comment_id:null,user_id:"456"}],"comments":[{post_id:1,user_id:"123",content:"great article!!!"},{post_id:1,user_id:"456",content:"bad article!!!"},],"users":[{id:"123",name:"Ferb"},{id:"456",name:"Duck"}]}

Query

db.posts.aggregate([/** COMMENTS LOOKUP*/{"$lookup":{"from":"comments","localField":"id","foreignField":"post_id","pipeline":[{"$lookup":{"from":"users","localField":"user_id","foreignField":"id","as":"usersLookup"}},{"$unwind":"$usersLookup"},{$sort:{_id:-1}}],"as":"commentsLookup"}},{$unwind:"$commentsLookup"},/** LIKES LOOKUP*/{$lookup:{"from":"likes","localField":"post_id","foreignField":"id","as":"likesLookup"}},{"$unwind":"$likesLookup"},{$group:{_id:"$id",title:{$first:"$title"},content:{$first:"$content"},likesLookup:{$push:"$likesLookup"},commentsLookup:{$push:"$commentsLookup"}}},{$project:{_id:1,title:1,content:1,likesLookup:1,commentsLookup:1}}])

Result