Mongodb – Mongo query for simple tree with only parent and first-level children using aggregation pipeline
Assume I have a collection, things, with the following documents: [ { "_id": 1, "name": "one", "others": [2, 3] }, { "_id": 2, "name": "two" }, { "_id": 3, "name": "three" }, { "_id": 4, "name": "four" } ] As…