ios - SUBQuery NSPredicate -
I have an array of dictionaries, in which the phone number is a key,
{ Email = "ryuiioo @ uioo.njk"; First name = Dry; Last name = Sam; Midnight = S; phonenumbers = ({home = 3452345345; main = 4985739804; mobile = 3567567741; other = 5769875698; test = 2290834709; test = 9336664648; function = 4523523453; iPhone = 3453245234;}); Record id = 66; } I am searching the array with this string " stringToSearch " This way I am trying to get the first name while searching NSMutableArray * allPredicatesArray = [NSMutableArray new]; NSPredicate * firstNamePredicate = [NSPredicate predicateWithFormat: @ "SELF.Firstname Begins [c]% @", StringTouch]; NSArray * firstNameFilteredArray = [self.recordsMutableArray filtered application user: firstname]; [All PaddicantesAreAdd ObjectFrammayre: InitiativeFilterAir]; Now, can I predict the "mobile" number search using NSpredicates
" phonenumbers "is an array , so you have to use" any ": NSString * numberToSearch = @ "3567567741"; NSPredicate * mobileNumberPredicate = [NSPredicate predicateWithFormat: @ "Start any phonenumbers.Mobile all% @", numberToSearch]; Assuming that the number is stored as a string.
Comments
Post a Comment