Ugh.... there is clearly something I am missing here.
[{"id":"50218f9a.469df8","type":"tab","label":"Flow 9","disabled":false,"info":""},{"id":"9a14acb6.6dd72","type":"xml","z":"50218f9a.469df8","name":"","property":"payload","attr":"","chr":"","x":530,"y":220,"wires":[["31f0acef.5b83ac"]]},{"id":"31f0acef.5b83ac","type":"change","z":"50218f9a.469df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"msg.payload.Channels.Channel","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":220,"wires":[["3d03ec25.73ecc4"]]},{"id":"3d03ec25.73ecc4","type":"split","z":"50218f9a.469df8","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":880,"y":220,"wires":[["7010b7f2.8fb6f8","885f5d0f.3427b"]]},{"id":"42fedac5.7f6b24","type":"join","z":"50218f9a.469df8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":750,"y":640,"wires":[["58eaa860.be847"]]},{"id":"43cf6866.589f78","type":"function","z":"50218f9a.469df8","name":"","func":"msg.payload = $append(array1, array2);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":760,"y":600,"wires":[[]]},{"id":"1048f1aa.8deaee","type":"change","z":"50218f9a.469df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$append(array1, array2)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":560,"wires":[[]]},{"id":"61750c95.26b3ac","type":"comment","z":"50218f9a.469df8","name":"multiple input wires then $append(array1, array2), then sort","info":"multiple input wires\nthen $append(array1, array2), then sort","x":750,"y":680,"wires":[]},{"id":"58eaa860.be847","type":"batch","z":"50218f9a.469df8","name":"","mode":"concat","count":"2","overlap":0,"interval":10,"allowEmptySequence":false,"topics":[],"x":880,"y":640,"wires":[[]]},{"id":"aa4156dd.4c607","type":"xml","z":"50218f9a.469df8","name":"","property":"payload","attr":"","chr":"","x":540,"y":280,"wires":[["266a040a.4dd9b4"]]},{"id":"266a040a.4dd9b4","type":"change","z":"50218f9a.469df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"msg.payload.Channels.Channel","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":280,"wires":[["f0fb987e.e33ce8"]]},{"id":"f0fb987e.e33ce8","type":"split","z":"50218f9a.469df8","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":880,"y":280,"wires":[["7010b7f2.8fb6f8","9e5ffff.f8e16"]]},{"id":"ce196d52.ae4e1","type":"xml","z":"50218f9a.469df8","name":"","property":"payload","attr":"","chr":"","x":540,"y":340,"wires":[["8e2ff621.0dd85"]]},{"id":"8e2ff621.0dd85","type":"change","z":"50218f9a.469df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"msg.payload.Channels.Channel","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":340,"wires":[["71b0d019.8e421"]]},{"id":"71b0d019.8e421","type":"split","z":"50218f9a.469df8","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":880,"y":340,"wires":[["b1a4010b.4738"]]},{"id":"b1a4010b.4738","type":"change","z":"50218f9a.469df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.$","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":340,"wires":[[]]},{"id":"bb642219.5e79d","type":"debug","z":"50218f9a.469df8","name":"joined output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1210,"y":240,"wires":[]},{"id":"7010b7f2.8fb6f8","type":"join","z":"50218f9a.469df8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"payload.$.ChannelID","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":1040,"y":240,"wires":[["bb642219.5e79d"]]},{"id":"885f5d0f.3427b","type":"debug","z":"50218f9a.469df8","d":true,"name":"system-a pre-join","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1080,"y":200,"wires":[]},{"id":"9e5ffff.f8e16","type":"debug","z":"50218f9a.469df8","d":true,"name":"system-b pre-join","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1080,"y":280,"wires":[]},{"id":"f4ded11b.7534d8","type":"comment","z":"50218f9a.469df8","name":"these are various options for merging the msgs. to use in successive steps","info":"","x":810,"y":520,"wires":[]},{"id":"9feb7e83.4c7478","type":"inject","z":"50218f9a.469df8","name":"","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":170,"y":280,"wires":[["f8db3eb3.f533b","361f002a.4274","dcaddb08.6225d"]]},{"id":"f8db3eb3.f533b","type":"change","z":"50218f9a.469df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"<Channels> <Channel ChannelID=\"1\" PropertyA=\"A\" /> <Channel ChannelID=\"2\" PropertyA=\"A\" /> <Channel ChannelID=\"3\" PropertyA=\"A\" /> </Channels>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":220,"wires":[["9a14acb6.6dd72"]]},{"id":"361f002a.4274","type":"change","z":"50218f9a.469df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"<Channels> <Channel ChannelID=\"1\" PropertyB=\"B\" /> <Channel ChannelID=\"2\" PropertyB=\"B\" /> <Channel ChannelID=\"3\" PropertyB=\"B\" /> </Channels>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":280,"wires":[["aa4156dd.4c607"]]},{"id":"dcaddb08.6225d","type":"change","z":"50218f9a.469df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"<Channels> <Channel ChannelID=\"4\" PropertyA=\"A\" PropertyB=\"B\" /> <Channel ChannelID=\"5\" PropertyA=\"A\" PropertyB=\"B\" /> <Channel ChannelID=\"6\" PropertyA=\"A\" PropertyB=\"B\" /> </Channels>","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":340,"wires":[["ce196d52.ae4e1"]]}]
This flow is somewhat illustrative of what I am trying to accomplish. Two files ("system-a" and "system-b") have the same child items. "system-a" has one property, and "system-b" has the other, for each child item. I need to merge these two with all the properties of each. Then, I need to append to that array, the user collection (which has the same merged formatting, but is a continuation of the master list).
I've tried a myriad of variations for the join (and nodes leading up to it) but given the parts
objects are essentially the same (except for their individual part.ids, understandably) I thought "automatic" should work great. I stand corrected.
The documentation demonstrates using a key/value Object join, which I've tried in my flow. It seems a little closer, but the two streams are being merged in a strange fashion. It seems so strange that selecting merged Object for the join, I get no debug output.
I am trying to get the msg =
{
"ChannelID": 1,
"PropertyA": "A",
"PropertyB": "B"
},
To do some further manipulation. Then finally (once the rest of the manipulations are done), the msg =
[
{
"ChannelID": 1,
"PropertyA": "A",
"PropertyB": "B"
},
{
"ChannelID": 2,
"PropertyA": "A",
"PropertyB": "B"
},
{
"ChannelID": 3,
"PropertyA": "A",
"PropertyB": "B"
},
{
"ChannelID": 4,
"PropertyA": "A",
"PropertyB": "B"
},
{
"ChannelID": 5,
"PropertyA": "A",
"PropertyB": "B"
},
{
"ChannelID": 6,
"PropertyA": "A",
"PropertyB": "B"
},
]
Perhaps I should create a separate web service which will do all this parsing, and leave nodered to just message passing?