MongoDB Compass
Apparence
Search
// by id { "_id": ObjectId("000xxx000") } // by sub-property { "property1.subProperty": "value" } |
Sort
// by id descending { "_id": -1 } |
Aggregations
lookup (join)
{ from: "ItemCollection", // foreign collection localField: "_id", // ItemGroupCollection._id (local collection) foreignField: "itemId", // join on ItemGroupCollection._id = ItemCollection.itemId as: "Items" } |