Comparing arrays in WHERE clause

Hi there!

I have a document like so under a Books collection:

{
 "id":"123456",
 "title":"My fight with life",
"tags": ["autobiography", "self-help", "motivational"]
}

How to write a query that matches books with multiple tags?
Something like ANY t IN tags SATISIFIES ANY x in ["motivational", "self-help"]

And that should retrieve this example book

Actually, I found it - I figured the query right, except I missed adding an END at the end of ANY t IN tags SATISIFIES ANY x in ["motivational", "self-help"] :slight_smile:

It should literally be ANY t IN tags SATISIFIES ANY t in ["motivational", "self-help"] END

2 Likes