Aggregate Mongo queries accept multiple steps, including SQL-style joins using $lookup
. This will add a new property to the results, with an array of documents from the other collection. You can then use $unwind
to make each result map to a single document from the other collection. Finally, $project
can help you select only the fields you care about.