I have a spark dataframe similar to this:

| ... | Rules | ... |
| --- | --- | --- |
| ... | [{"id": 1,...}, {"id": 2}] | ... |
| ... | [{"id": 5,...}] | ... |

`Rules` is an array column, where each element has the `id` field.

And I want to filter all rows which contain a rule with `id` < 3. Is it possible to do this **without UDFs**? My dataframe is very large and UDFs impair the perofrmace of my query.