简体   繁体   中英

Display Firebase Keys that has a specific children values

I want to be able to check the keys from my database whose child has a value that matches a specific value. For example, My keys are:
- A
- B
- C;
Each key has a child called Verified that either has a value of true or false. Currently, I can display all the keys using the code below. What I don't understand is how can I display the same keys but only the ones whose child verified == "True"

if let snapDict = snapshot.value as? [String:AnyObject]
     {
           for each in snapDict
           {
               let  names = each.key
               let initialisation = ListOfNames(names: names)
               self.names.insert(initialisation, at: 0)
           }
      }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM