postgres set jsonb value code example
Example 1: postgres jsonb array push new element
UPDATE jsontesting
SET jsondata = jsondata || '["newString"]'::jsonb
WHERE id = 7;
Example 2: update json in postgres
[{“type”: “phone”, “value”: “+1–202–555–0105”}, {“type”: “email”, “value”: “jimi.hendrix@gmail.com”}]
[{“type”: “email”, “value”: “janis.joplin@gmail.com”}]