Azure Cosmos DB SQL API - Querying Nested Arrays with .NET SDK scenarios with Invalid Query
I'm getting frustrated with I've searched everywhere and can't find a clear answer. I'm relatively new to this, so bear with me. I'm trying to query a nested array in Azure Cosmos DB using the SQL API with the .NET SDK, but I'm running into issues with the query returning an 'Invalid Query' behavior. My document structure looks like this: ```json { "id": "1", "name": "Item 1", "tags": [ { "type": "category", "value": "book" }, { "type": "author", "value": "author1" } ] } ``` I'm attempting to retrieve documents where the `tags` array contains a specific tag type. Here's the code I'm using: ```csharp var client = new CosmosClient("<your-connection-string>"); var container = client.GetContainer("databaseName", "containerName"); var query = "SELECT * FROM c WHERE ARRAY_CONTAINS(c.tags, { 'type': 'category' })"; var iterator = container.GetItemQueryIterator<dynamic>(query); while (iterator.HasMoreResults) { var response = await iterator.ReadNextAsync(); foreach (var item in response) { Console.WriteLine(item); } } ``` However, I'm getting an behavior that states: "Invalid Query - The query is invalid because it contains an expression that is not supported." I've tried escaping the quotes and simplifying the query, but nothing seems to work. I also verified that the SDK version is up to date (Microsoft.Azure.Cosmos 3.19.0). I even considered using the `JOIN` clause, but since it's just a simple nested array check, I thought that would be overkill. What am I missing? Is there a different way to formulate this query to get the desired results? Am I missing something obvious? My development environment is Windows. I'd really appreciate any guidance on this.