I have the following query mongoDB
{
"name": "juan",
"class": {
"name": "person" // is the field of another collection.
}
}
and what I want to achieve is the following
{
"name": "juan",
"class": "person"
}
But I need everyone's support to achieve the above.
$projectionin docs.