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';
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';
update json in postgres
[{“type”: “phone”, “value”: “+1–202–555–0105”}, {“type”: “email”, “value”: “[email protected]”}]
[{“type”: “email”, “value”: “[email protected]”}]
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us