I have multiple dictionaries, each with a unique key, value pair. I would like to merge these dictionaries into a single dictionary. Any suggestions on how to accomplish this would be appreciated.
Discussion posts and replies are publicly visible
I've accomplished this effectively using these three expression rules:extractKeysFromDictionary:
a!forEach( items: xpathsnippet(toxml(ri!dictionary), "/*/*"), expression: index(split(index(split(fv!item, " "), 1), "<"), 2) )
a!forEach( items: rule!extractKeysFromDictionary(ri!dictionary), expression: property(ri!dictionary, fv!item) )
reduce( fn!insert, ri!dictionary1, merge( rule!extractValuesFromDictionary(ri!dictionary2), rule!extractKeysFromDictionary(ri!dictionary2) ) )