Here I have a sample Nested Array. I have a problem with writing proper queries on this collection which is deeply nested.
{
"productUUID" : "craft001",
"providers": [
{
"providerUUID": "prov001",
"orgs": [
{
"orgUUID": "org001",
"location": {
"buildings": [
{
"buildingUUID": "sit001",
"floors": [
{
"floorUUID": "GrndFlr",
"assets": [ ],
"agents": [ ],
"users": [ ]
},
{
"floorUUID": "1stFlr",
"assets": [ ],
"agents": [ ],
"users": [ ]
}
]
},
{
"buildingUUID": "ist001",
"floors": [ ]
}
]
}
},
{
"orgUUID": "org002",
"location": {
"buildings": [ ]
}
}
]
},
{
"providerUUID": "prov002",
"orgs": [ ]
}
]
}
Question in simple words, "1. Get all orgUUIDs which fall under providerUUID: "prov001"".
Similarly, "2. Get all floorUUIDs where "buildingUUID": "sit001"".
If someone can help me with the 1st ques, I hope I can solve the 2nd ques myself.