Answers for "postgresql update json field key value"

1

postgresql update json field key value

UPDATE table_name SET attrs = jsonb_set(cast(attrs as jsonb), '{key}', '"new_value"', true) WHERE id = 'some_id';
Posted by: Guest on July-29-2020
1

update json in postgres

[{“type”: “phone”, “value”: “+1–202–555–0105”}, {“type”: “email”, “value”: “[email protected]”}]

[{“type”: “email”, “value”: “[email protected]”}]
Posted by: Guest on December-07-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language