Home App Docs Blog Github

Filtering by values in a List type field

Hi, is it possible to filter entries by any value in a list field?

"data": {
          "list": [
            {
              "entry": {
                "id": 1, "field1": 'hi',
                "field2": "rly",
              }
            },
            {
              "entry": {
                "id": 2, "field1": "wat",
                "field2": "rly",
              }
            }
          ]
        }

Id like to filter by field2 to get two entries.
Id like to filter by field2 AND field1 to get one entry.
Or maybe even more complex. field2 AND (field1AND etc field3)

Is that possible?

You can try out different content queries in our api-explorer: https://builder.io/api-explorer

The query field allows you to perform complex queries like in your example above:

In my case evenMoreCustomAttrs is a list of objects, and I need to filter by value of one of the properties :slight_smile: Pretty complex problem

As above: query.data.evenMoreCustomAttrs[???].entry.field1.$in=[‘wat’, ‘do’]