In Postgres 13.3, I'd like to extract sub-arrays of a particular length from a jsonb
value:
select jsonb_path_query('[[0,1], [0,1,2]]'::jsonb, '$[*] ? (@.size() >= 3)');
However, this returns nothing (0 rows).
What am I doing wrong?
Note that I'd like to keep using jsonpath
- while this example is simplified, the real case is much more involved and relies on the flexibility of jsonpath expressions.