We need to update multiple values inside a JSON-document.
The only way I could find doing this without pushing the whole thing was by nesting json_set calls:
UPDATE mytale SET data=json_set(json_set(json_set(data, '{field1}'::string[], :field1)::jsonb, '{field2}'::string[], :field2)::jsonb, '{field3}'::string[], :field3) WHERE id=:id
Is there a better way because this feels pretty awkward to do