I'm locally doing the Node.js exercise as MongoDB proposed at link
There are two collections, orders and product .
After aggregation, the expected result would be:
[
{ _id: 1, product_id: 154, status: 1, orderdetails: [
{ _id: 154, name: 'Chocolate Heaven' } ]
}
]
However, in my local instance, I'm getting the following:
[ { _id: 1, product_id: 154, status: 1, orderdetails: [ [Object] ] } ]
Is there any trick for [Object] to be shown as {_id: 154, name: 'Chocolate Heaven'} ?
Thank you!