Since PostgreSQL allows for functional indexes, you can query and index the data in a structured way.
For example you have a table t with "id" and "data" where data is a jsonb field like {foo: ..., bar: ...}. You can do
SELECT id, data->'foo'
FROM t
WHERE data->'bar' > 5
Which will yield the value of "foo" (inside the json field) for rows where "bar" (inside the json field) is greater than 5.