fn jsonb_remove(v: JsonbRef<'_>, key: &str) -> Result<JsonbVal>
Expand description
Removes a key (and its value) from a JSON object, or matching string value(s) from a JSON array.
Examples:
# remove key from object
query T
SELECT '{"a": "b", "c": "d"}'::jsonb - 'a';
----
{"c": "d"}
# remove matching value from array
query T
SELECT '["a", "b", "c", "b"]'::jsonb - 'b';
----
["a", "c"]
query error cannot delete from scalar
SELECT '1'::jsonb - 'b';