I am retrieving data from the Firebase Database using this:
[[[[_ref queryOrderedByChild:@"name"] queryStartingAtValue:@"Smith"] queryEndingAtValue:@"Smith\uf8ff"] observeEventType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot *snapshot) {
and the result is all records starting with "Smith" the name field.
But I want to get all records where the name field has in any position "Smith". So I have tried this:
queryStartingAtValue:@"%Smith%"
with only the queryStartingAtValue i get back the records that has in any position in the name field "Smith" and after that all other records, as I haven't put in the queryEndingAtValue.
When adding this:
queryEndingAtValue:@"%Smith\uf8ff%"
it is strange, because I don't get any record.
Does anyone has found a solution for this?