I am trying to query a PFObject that contains an array. I am looking to match a given NSString against any object within the PFObject's array of strings. According to http://blog.parse.com/2012/03/28/parse-supports-many-to-many-relations/, I can use whereKey:equalTo to look for matches within an array.
I have replaced the variable I would usually use with the string that I know to be in the array whose object I am querying. It is a character-for-character match. Yet the query returns no matches.
My code:
PFQuery *convosQuery = [PFQuery queryWithClassName:@"convo"];
PFObject *currentUserFacebookID = [NSString stringWithFormat:@"11808098"];
[convosQuery whereKey:@"nonUserFacebookIDs" equalTo:currentUserFacebookID];
[convosQuery findObjectsInBackgroundWithBlock:^(NSArray *convos, NSError *error) {
for (PFObject *convo in convos) {
NSLog(@"user/convo match found");
As I said, this returns no matches even though a PFObject of class "convo" contains for key "nonUserFacebookIDs" the value "[["11808098"]]".
What could be going on?