for example, my data structure is like this
{
members: ["id1", "id2"]
}
Now how can I query where any document with members fields that contains both “id1” and “id2”
for example, my data structure is like this
{
members: ["id1", "id2"]
}
Now how can I query where any document with members fields that contains both “id1” and “id2”
@vsr1 - Hey small question, how would you solve this? thank you
@ceddy ,
SELECT d.*
FROM default As d
WHERE ANY v IN members SATISFIES v = "id1" END AND ANY v IN members SATISFIES v = "id2" ;
OR
SELECT d.*
FROM default As d
WHERE EVERY v IN ["id1", "id2"] SATISFIES v IN members END;
WHERE “id1” IN members AND “id2” IN members