I need to search over the values of an array key of jsonb field in Postgres.
field: {'array_key' : [1, 2, 3, 4]}
Is it possible to add index on array_key or is there any optimized method to search over the values ?
search query will be something like
select * where field['array_key'].include?(2)