How to query embedded json (with or without property)


I have a json document called “sample” like this -

I want to know how to find all documents where pid is “abc” when nested json is defined as embedded document.

When its not an embedded document I can query it as below -

SELECT FROM sample WHERE config[“is”].pid CONTAINS(‘abc’)

But the same doesn’t work when config is defined as an embedded document.


Hi @sourav.da

If pid is a collection, then it should work fine. Could you please post a simple SQL script to reproduce the exact case?