After using "Split", how would I "Join" the message parts into 1 such that it can handle join on payload as well as some other properties of the msg.
Eg:
// with input =
{
"_msgid": "...",
"payload": ["a", "b"]
}
// after split, we get two msgs (this is standard functionality)
{
"payload": "a",
"parts": {
"id": "a3152324.a7d68",
"type": "array",
"count": 2,
"len": 1,
"index": 0
},
"_msgid": "629fb3d3.85cadc"
}
// and
{
"payload": "b",
"parts": {
"id": "a3152324.a7d68",
"type": "array",
"count": 2,
"len": 1,
"index": 1
},
"_msgid": "629fb3d3.85cadc"
}
// then I perform some transformation on each msg and add an amount value:
{
"payload": "a",
"amount": 55,
"parts": {
"id": "a3152324.a7d68",
"type": "array",
"count": 2,
"len": 1,
"index": 0
},
"_msgid": "629fb3d3.85cadc"
}
// and
{
"payload": "b",
"amount": 45,
"parts": {
"id": "a3152324.a7d68",
"type": "array",
"count": 2,
"len": 1,
"index": 1
},
"_msgid": "629fb3d3.85cadc"
}
// then I want the following output after join:
// it must join the msgs to get the original payload, as well as add the amounts
{
"_msgid": "...",
"payload": ["a", "b"],
"amounts": 100
}
Edit 1
I tried with Join node using "reduce sequence" mode, but it seems to operate on payload only
Edit 2
Added a more evolved example using "amounts" property