Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLJSONB queryingSingle-choice MCQ

You need to remove every key whose value is JSON null from a jsonb document, but keep keys whose value is an empty string or 0. Which expression does exactly that?

-- data = '{"a": null, "b": "", "c": 0, "d": 1}'::jsonb