I have wrote query like this to check json column has key
SELECT *
FROM "details"
where ("data"->'country'->'state'->>'city') is not null;
How can we write query which will select row if "data" contains "city"
JSON structure of data is not consistent.