Is there a way to set a nested element for which the parent paths do not yet exist?
For example, if I have a JSONB value called 'data':
{
"foo": "bar"
}
and run
jsonb_set(data, {'boo', 'baz'}, 'newvalue')
jsonb_set(data, {'boo', 'baz'}, 'newvalue')
I would expect the output to be:
{
"foo": "bar",
"boo": {
"baz": "newvalue"
}
}
But that does not appear to work..
Any suggestions would be appreciated.
Deven