Parse.com request objects, where the key array value contains any of the elements

on https://parse.com/docs/js_guide#queries-arrays there is an example of how to find objects in which the value of the key array contains each of elements 2, 3 and 4 with the following:

// Find objects where the array in arrayKey contains all of the elements 2, 3, and 4.
query.containsAll("arrayKey", [2, 3, 4]);

However, I would like to find objects in which the value of the key array contains at least one (not necessarily all) elements 2,3 and 4.

Is it possible?

+4
source share
2 answers

I'm not sure, but what happens if you try containedIn?

I think if you pass an array, it checks to see if any files are contained.

query.containedIn("arrayKey", [2,3,4]);

, equalTo , , TRUE. , - . , , - "arrayKey" . - , .

+11

swift 3.0

let Query:PFQuery = PFQuery(className: "className")
Query.whereKey("Field Name", containedIn: array)// ["1","2","3"];
0

Source: https://habr.com/ru/post/1540073/


All Articles