I'm facing some dificult to make this query with the MongoDB Aggregation Framrwork.
I have a order collection that has an array of objects ids from products example:
{
_id: "5759b760aeacbfa420943d84",
products: [
"57718a2c9473f30ae88d1875",
"57727d988d7e581809b454a1",
"577bda7da756e2180507a944"
]
}
Here is an example of one document from my products ocllection:
{
_id: "57718a2c9473f30ae88d1875",
name: "Soap A"
}
How can I make an aggregation query in orders to get a list of contained products documents?