json

jsonb_set_lax

Allows explicit handling of SQL NULL replacement values, such as deleting the key.

Formal Syntax & Structure

sql syntaxsql
jsonb_set_lax(target, path, new_value [, create_if_missing [, null_value_treatment]])

Working Example

Example Snippetsql
SELECT jsonb_set_lax('{"a":1}', '{a}', NULL, true, 'delete_key');
SQL Reference