I am using parse and and am trying to use the below code to try check which users have a certain string in the array @"Id1". However i'm not getting any objects back. Is whereKey:containsString only for searching parse string values? If so how can I search the parse arrays to see if they contain a string? Thanks in advance.
NSString *searchId = [[NSUserDefaults standardUserDefaults] objectForKey:@"searchId"];
PFQuery *query = [PFUser query]; //1
[query whereKey:@"Id1" containsString:searchId];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {//4
if (!error) {
NSLog(@"1");
self.ObjectsArray = nil;
self.ObjectsArray = [[NSArray alloc] initWithArray:objects];
} else {
[[[UIAlertView alloc] initWithTitle:@"Error" message:@"Please make sure you have a proper device connection." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
}
}];