解析查询,其中键包含数组中的任何对象

Jam*_*ite 2 objective-c parse-platform

我的解析类有一个名为“postcodes”的属性,它是一个数字数组。

在我的应用程序中,我有一组“relevantPostcodes”。我想创建一个查询,其中 postcodes 键包含“relevantPostcodes”数组中的任何对象。

类似于 [query whereKey:@"postcodes" containsAnyObjectInArray:relevantPostcodes"]。有什么想法吗?

dan*_*anh 5

您可以使用[query whereKey:@"postcodes" containedIn:relevantPostcodes]. 请参阅文档中说明。就像 equal to 方法一样,我认为它将对数组类型属性进行操作并执行您需要的操作。