I have cosmos db items that are structured like this:
{
"id": "ec79ff89-13a2-4da9-9a8d-e0ccc8e55f8e",
"AttachmentIds": [
"aa0805b7-e5f9-42ee-8cb9-07beadaaed31",
"15072c53-3c4b-47c2-ac91-8d9d3138bf96"
],
"_ts": 1589411571
}
I just want to write a simple query that returns the items that have an "AttachmentId" containing "aa0805b7-e5f9-42ee-8cb9-07beadaaed31". I cannot seem to get it to work. This is what I have so far, but I'm getting a syntax error:
SELECT * FROM c where ARRAY_CONTAINS(c.AttachmentIds, {"aa0805b7-e5f9-42ee-8cb9-07beadaaed31"}, true)
Any help is greatly appreciated.