James White
James White

Reputation: 784

Parse query where key contains any object in array

My parse class has a property called "postcodes", which is an array of numbers.

In my app, I have an array of "relevantPostcodes". I want to create a query where the postcodes key contains any object from the "relevantPostcodes" array.

Something like [query whereKey:@"postcodes" containsAnyObjectInArray:relevantPostcodes"]. Any ideas?

Upvotes: 2

Views: 1453

Answers (1)

danh
danh

Reputation: 62686

You can use [query whereKey:@"postcodes" containedIn:relevantPostcodes]. See the description in the doc. Just like the equal to methods, I think it will operate on array type attributes and do what you need.

Upvotes: 5

Related Questions