Details
-
Type:
Task
-
Status: Done
-
Priority:
(None)
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Documentation
-
Labels:None
-
Story Points:0
Description
https://groups.google.com/g/help-cfengine/c/Hy5nYYpZZTk
But what is supposed to happen when the same key, and with potentially different value, appears in both JSON datasets?
The last one wins:
Last one wins
bundle agent __main__ { vars: "one" data => '{ "thing": "one", "color": "red", "stuff": [ "one", "two" ] }'; "two" data => '{ "color": "blue", "stuff": [ "three" ] }'; reports: "$(with)" with => storejson( mergedata( one, two ) ); }
R: { "color": "blue", "stuff": [ "three" ], "thing": "one" }