I need to retrieve the entire single object hierarchy from the database as a JSON. Actually the proposal about any other solution to achive this result would be highly appriciated. I decided to use MongoDB with its $lookup support. So I have four collections: Users Posts Comments Replies I basically need to retrieve all posts with all corresponding comments and