This query
SELECT '{"a": 1, "b": [{"x": "y"}]}'::jsonb || '{"b": [{"a": "b"}]}'::jsonb
returns
"{"a": 1, "b": [{"a": "b"}]}"
But I need
"{"a": 1, "b": [{"x": "y"}, {"a": "b"}]}"
How can this be done? PG 9.5
This query
SELECT '{"a": 1, "b": [{"x": "y"}]}'::jsonb || '{"b": [{"a": "b"}]}'::jsonb
returns
"{"a": 1, "b": [{"a": "b"}]}"
But I need
"{"a": 1, "b": [{"x": "y"}, {"a": "b"}]}"
How can this be done? PG 9.5