jsonobjectmerge what is the merge algorithm?

+1 vote
Hi Multichain folks,

Is there a particular merging algorithm that is used to merge the json objects in jsonobjectmerge? Is it similar to using object.assign() in javascript?
asked Sep 16 by StevenChan

1 Answer

0 votes

Assuming you only use the jsonobjectmerge flag, the rule is quite simple:

1. The final object contains the union of all the field names in the objects merged.

2. The field value for each name in the final object will be the most recent value from the objects merged.

So yes, this looks like the logic for Object.assign() in JavaScript.

Note however there are many flags in MultiChain to modify this default behavior, as described in the documentation for MultiChain 2.0 (alphas).

answered 6 days ago by MultiChain
...