Query nested object/array

My page data is something like…

targetGroups": {
    "iv": [
        {
            "schemaId": "2c3faeb9-d493-4bd1-94d4-b2fffaa7f7d0",
            "0a32621f3dd248328e7510c2278": false,
            "0970731e51074f4fbbf4d033d58": false,
            "7936e931c7c14806b22a48bf7c9": false,
            "7ea6c091110e4702b7e8a7cc1c2": false,
            "244b4c57ad744d22b16ad9662bc": false,
            "757b587c9b8e43889184566bd52": true
        },
        {
            "schemaId": "92c403ae-9f4a-4512-922a-da94936e2527",
            "783c6d2dbcaa486fb8b61b31011": false,
            "4236e16b334241ccbb55277dd20": false,
            "5fc65b71c00248d6b9bacd1f404": false,
            "13b3b5bb8f124e228cd87695177": true
        }
    ]
}

Not sure how to query pages if value is true ?

So I tried so far (not succeed)

{
  queryPagesContents (filter: "data/targetGroups/iv ??????") {
    id
  }
}

What field type do you use?

its components with boolean

And what are these numbers? do you want to know if at least one field is true?

keys are my custom data.

If you want to search for a concrete field this might work: data/targetGroups/iv/0a32621f3dd248328e7510c2278 eq true

if you want to test on all fields I would create a extra field and compute that with a script.

1 Like

Thanks, I will find/research more.

Im so new about query this in GraphQL, can you help me with syntax or any docs can I read ?

thanks

I try to read the doc from https://docs.squidex.io/02-documentation/developer-guides/api-overview/api

My data same like founders in your example, but in the docs say nothing about that :smiley:

It should work. Can you provide me the json of your schema (from the sync tab) so that I can test it?