The set up is ruby on rails, in a postgres database.  The table is called line_sources and a JSON column is called names.  I want to return all rows where the names column contains a key called away_names.  I'm trying this but they fail:
LineSource.where("names -> 'away_names'")
and
LineSource.where("names ->> 'away_names' = '%'")
 
     
    