查询数组字段不包含值的对象

时间:2014-07-03 01:28:56

标签: rest parse-platform

尝试实施国家/地区黑名单,但我不清楚如何使用Parse REST API在数组字段上查询否定匹配。这些国家是一个数组密钥。

blacklistCountries = [ "CN", "KP" ]

有类似$not的内容吗?

where={ blacklistCountries: { $not: "CN" } } 

1 个答案:

答案 0 :(得分:2)

我认为您想要的是$ne(不等于),如Query Constraints中所述:

where={"blacklistCountries":{"$ne":"CN"}}