I have a jsonb column in postgres db. I need to query for an existence of specific key "ssn" in the json stored in the column. This key is not a top level key, but is nested. I wrote a query similar to below but it doesn't seem to retrieve the appropriate columns -
select * from application where content ? 'ssn';
When I run the above query with top level keys , it works.
{
"name":"bob",
"business":{
"ssn":"XXXXXXXX",
}
}