I want to join two list into one using deep copy.
E.g.
list1:
[
{"key1":["val1"]},
{"key2":["val2", "val3"]}
]
list2:
[
{"key2":["val2", "val4"]},
{"key3":["val5"]}
]
I want the output to be :
[
{"key1":["val1"]},
{"key2":["val2", "val3", "val4"]}
{"key3":["val5"]}
]
I tried std.mergePatch but it just overrides the previous list. Thanks,
Copying below a possible solution, which "unrolls" the list(s) down to single key-value entries, then aggregate them into the manifested object, note that the code is long because of detailed comments.