Posts Tagged ‘aggregation framework’

Using the $lookup operator in MongoDB 3.2

I often loiter over on the MongoDB User Google Group and there was an interesting question posted the other day. The poster wanted to form a document like this from two collections (where foo is a document from another collection)… ?View Code JAVASCRIPT{ "_id" : ObjectId("ObjectId of this bar"), "name" : "Bar Name", "foo" : […]