I tried something like this...
result = User.includes(:detail).where("detail.strings->'the_key') IS NOT NULL")
But that doesn't seem to work. I want to join User to Detail and then check the column strings in the table Detail to see if the json stored in strings has the_key. That doesn't work. I also tried use strings-> but that didn't work as well