I am attempting to query some hierarchical data in firebase. I'm having a little difficulty in figuring out how to query the following data structure:
{
"orgs": {
"-KBFXBBEyvgtfqMvU4pi": {
"name": "ACME 123",
"owner": "-K9IPqIUIuEFzLS0f_Pe",
"users": {
"-KBF_GhwTmXfR6Jce30t": {
"email": "[email protected]",
"permission": "editor",
"userKey": "K99LV9cTjh1ovW1D5j2"
},
"-KBF_M533zzbUilGvAAW": {
"email": "[email protected]",
"permission": "editor"
}
}
},
"-KBFaKlJ8tfqjBQjAZgq": {
"name": "ACME Alt LLC",
"owner": "-K9IPqIUIuEFzLS0f_ZZ",
"users": {
"-KBFbD4trt9nyeHPUQbn": {
"email": "[email protected]",
"permission": "editor"
}
}
}
}
}
Specifically, I would like to find out if the email address "[email protected]" exists. But this is a little confusing for me since I need to search through 2 levels (orgs and users).