so=# with c(j) as (values
('{ "en":{"locale":"en","name":"Namur"},"de":{"locale":"de","name":"Namur"},"bg":{"locale":"bg","name":"Намюр"} }'::json)
,('{ "en":{"locale":"en","name":"Mouscron"},"pl":{"locale":"pl","name":"Mouscron"},"de":{"locale":"de","name":"Mouscron"} }')
)
, filter as (select j,j->json_object_keys(j)->>'name' like '%amur%' as "found" from c)
select distinct j::jsonb from filter where found;
j
-----------------------------------------------------------------------------------------------------------------------------
{"bg": {"name": "Намюр", "locale": "bg"}, "de": {"name": "Namur", "locale": "de"}, "en": {"name": "Namur", "locale": "en"}}
(1 row)
не возражаю, я бросил json в jsonb, чтобы отфильтровать обманщиков