I have a structure like this:
{ "id": "object1", "fields": [{"id": 100, "value": "one"}, {"id": 101, "value": "abc"}]}
{ "id": "object2", "fields": [{"id": 100, "value": "two"}, {"id": 101, "value": "cde"}]}
{ "id": "object3", "fields": [{"id": 100, "value": "three"}]}
where fields are a nested datatype.
With a nested query I can get all objects that have a specific value of given field (for example with: field.id = 101 && field.value = "abc" I can get object1).
How can I query for objects, whose fields arrays don't include given field by its id?
- Example1: I want all objects that do not have a field with id 101 - returns object3
- Example2: I want all objects that do not have a field with id 102 - returns object1, 2 and 3
What I'm looking for is basically an exists query (which I can then negate) that accepts a predicate.