By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table t (js json);
insert into t values('{"slug": "SLUG","price": {"44":12,"_default":12}, "test": "TEST"}');
update t
set js = json_replace(js, '$.price', json_object('44', 13, '_default', 13))
Rows matched: 1 Changed: 1 Warnings: 0
select * from t
js |
---|
7b22736c7567223a2022534c5547222c202274657374223a202254455354222c20227072696365223a207b223434223a2031332c20225f64656661756c74223a2031337d7d |