Description Usage Arguments Value Examples
By merging two objects you can add, modify, or remove elements of an object.
Arrays cannot be modified but only replaced as a whole. It is mostly a small
wrapper around the SQLite function
json_patch()
.
1 | json_merge(x, y)
|
x |
A JSON vector to update. |
y |
A JSON vector with updated values. |
A json2
vector.
1 2 3 4 5 6 7 8 | # update element with key "a"
json_merge('{"a": 1, "c": 3}', '{"a": 11}')
# you can also add elements
json_merge('{"a": 1, "c": 3}', '{"b": 2}')
# remove elements with `null`
json_merge('{"a": 1, "c": 3}', '{"c": null}')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.