Joining Collections in MongoDB Queries using $lookup

Note: This only works in MongoDB 3.2 or later, be sure to update if you need this functionality! In situations where you have an ObjectID in a collection and you want it resolved by MongoDB during your query, you can accomplish this with aggregate and lookup. Let’s say we had two collections: insuranceClaim and insuranceProvider.… Continue reading Joining Collections in MongoDB Queries using $lookup