Add a recursive object merge strategy and bind it to *
This commit adds a jv_object_merge_recursive function, that performs recursive object merging, and binds it to multiply when applied to two objects. Added docs and tests. Closes #320
This commit is contained in:
1 parent
219bb9ecb7
commit
2aa8a43c5b
5 files changed
+44
-1
No files matched your search
@@ -779,3 +779,15 @@ null
|
||||
map([1,2][0:.])
|
||||
[-1, 1, 2, 3, 1000000000000000000]
|
||||
[[1], [1], [1,2], [1,2], [1,2]]
|
||||
|
||||
{"k": {"a": 1, "b": 2}} * .
|
||||
{"k": {"a": 0,"c": 3}}
|
||||
{"k": {"a": 0, "b": 2, "c": 3}}
|
||||
|
||||
{"k": {"a": 1, "b": 2}, "hello": {"x": 1}} * .
|
||||
{"k": {"a": 0,"c": 3}, "hello": 1}
|
||||
{"k": {"a": 0, "b": 2, "c": 3}, "hello": 1}
|
||||
|
||||
{"k": {"a": 1, "b": 2}, "hello": 1} * .
|
||||
{"k": {"a": 0,"c": 3}, "hello": {"x": 1}}
|
||||
{"k": {"a": 0, "b": 2, "c": 3}, "hello": {"x": 1}}
|
||||
Reference in new issue
Block a user