0

I have a database that looks like the following

{
   00001: {
     "destination": "A",
     "name": "John Doe",
     "status" : "1",
     "taken"  : "0"
   },
   00002: {
     "destination": "A",
     "name": "Doe John",
     "status" : "1",
     "taken"  : "0"
   },
   00003: {
     "destination": "Undefined",
     "name": "Dell MacApple",
     "status" : "0",
     "taken"  : "0"
   },
   00004: {
     "destination": "B",
     "name": "John Macintosh",
     "status" : "1",
     "taken"  : "1"
   }
}

Would it be possible for me to create a complex query that only prints children that meet very specific criteria?

For example, If I wanted only users who's "status" is "1" "taken" is "0" "destination" is "A", would I then be able to print the name?

Would I be able to get output like John Doe and Doe John meet these requirements?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • this is a common topic here and the question I linked pretty much cover the whole subject. After reading take your try with swift/objective-c ([documentation](https://firebase.google.com/docs/database/ios/retrieve-data)) and let us know if you have any other specific doubt. – adolfosrs Jun 26 '16 at 18:36
  • Thank you very much – AlexanderHart Jun 26 '16 at 19:13

0 Answers0