Mongodb – How to use graphLookup to get the leaves of a tree-like data spread over 3 documents?
I have the following MongoDB collections: items: _id: ObjectId boxes: _id: ObjectId items: ObjectId[] boxes: ObjectId[] containers: _id: ObjectId boxes: ObjectId[] The items can be directly contained in boxes, and boxes can contain other boxes indefinitely deep. I am trying…