Firebase: Swift - the request value in the child node without knowing the parent key

Image example of my firebase data

I have a firebase database in which I imported a list of approx. 8,200 universities with details that were viewed above.

I want to be able to enter an email address in a text box, then request a portion of the "domain" of this JSON. My problem is that I need to request all the domains in the 8000 list, however I don’t know how to search for a domain declaration. I do not have "7542" to use childByAppendingPath.

So, I have a link to "universities", but I need to be able to query the "domain" without knowing the parent key (ie 7542 in the above example, but I want to search the domain ", iautb.ac.ir ").

+4
1

, , , firebase.

-

let myRef = Firebase(url: "https://your.firebaseio.com/universities")
let query = myRef.queryOrderedByChild("domain").queryEqualToValue("yourDomainSearchValue")

,

+16

All Articles