I want to use this mongoDB collection:
[
{
"_id": {
"$oid": "627c4eb87e7c2b8ba510ac4c"
},
"Contact": [
{
"name": "ABC",
"phone": 5501234,
"mail": "abc@mail.com"
},
{
"name": "DEF",
"phone": 6001234,
"mail": "def@mail.com"
}
],
"nomatter": "trash"
}
]
search for {"name":"ABC"}
and return only {"mail":"abc@mail.com"}
.
It's possible to use find or it's necessary to use aggregate?