Arash Zeinoddini Arash Zeinoddini -4 years ago 146
iOS Question

Search in firebase database

Sorry i'm new with firebase.
I wanna search on firebase database to find a specific object.
My Structure on firebase

how can i find a user that has a specific udid based on my structure?

Answer Source

You can go like this.

[[[[ref child:@"users"] queryOrderedByChild:@"udid"] 
              queryEqualToValue: yourUDID]                                       
              observeEventType:FIRDataEventTypeValue
              withBlock:^(FIRDataSnapshot *snapshot) {

       NSLog(@"snapshot: %@", snapshot.value);
}];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download