Search an array in the WHERE clause


#1

I have a user document that has an array contained within it. The array is name credits and is a JSON object that each element has a property with a boolean called verified on it. I am trying to get the entire user document that falls under the condition of having at least ONE of the verified flagged as false. I have tried
SELECT user.* FROM user WHERE credits[*].verified = false
SELECT user.* FROM user WHERE ANY verified in credits SATISFIES verified = false END

Exampl entry User: { credits: [{ verified: false }] }


#2

SELECT user.* FROM user
WHERE ANY v IN user.credits SATISFIES v.verified = false END


#3

Thank you very much, i feel like a fool to not realize the aliasing there