Exemplos com ActiveRecord:
Post.order("data->'hello' DESC")
Record.where("data ->> 'likelihood' = '0.89'")
Record.where("column_data -> 'nest' ->> 'nest1' = 'yes'")
Record.where("column_data #>> '{data1,1}' = '2'")
Record.where("column_data ->> 'array' LIKE ?", "%hello%")Use -> para JSON e ->> para texto.