[
{
"_id": "grandParentId",
"types": [
{
"_id": "parentId",
"files": [
{
"url": "1.example.com",
"_id": "1childId"
},
{
"url": "2.example.com",
"_id": "2childId"
}
]
}
]
}
]
cond: { _id: 2childId }
expected output: {
“url”: “2.example.com”,
“_id”: “2childId”
}
question 2: is this a good approach or should I just use loops to get the desired output?