By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| column1 |
|---|
| [{"blah": "blah", "owners": ["admin"]}, {"blah": "blah", "owners": ["john@google.com"]}, {"blah": "blah", "owners": ["jason@facebook.com", "fred@facebook.com"]}, {"blah": "blah", "owners": ["zuck@facebook.com", "bill@google.com"]}] |
SELECT 1
CREATE FUNCTION
CREATE AGGREGATE
| jsonb_set_agg |
|---|
| [{"blah": "blah", "owners": ["admin"]}, {"blah": "blah", "owners": ["john@google.com"]}, {"blah": "blah", "owners": ["insert_here_the_new_value", "insert_here_the_new_value"]}, {"blah": "blah", "owners": ["insert_here_the_new_value", "bill@google.com"]}] |
SELECT 1