DEV Community

loading...

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

Collapse
petereysermans profile image
Peter Eysermans Author • Edited

Hello, this is the query you are looking for:

 SELECT c.feedback from c
 join a in c.feedback.Features
 where a.state = 'new'
and length(a.id) > 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.