DEV Community


Discussion on: Things I wish I knew before I got started with CosmosDB

petereysermans profile image
Peter Eysermans Author • Edited

Hello, this is the query you are looking for:

 SELECT from c
 join a in
 where a.state = 'new'
and length( > 4

As you can see there is a join on the Features array and then the fields of that array can be queried.

There are also additional options on the ARRAY_CONTAINS which are interesting to look at if you are working with nested objects and nested arrays.