So that is all working fine. What I could not get to work (I found a workaround but want to learn as thats important to know) is in the msg = { payload: (sync_array.reduce... I also wanted to set payload.name. I tried various things, the best I managed was a name object. A lot of things I tried adding to that line to set payload.name ended in errors in the function. If I set it after the msg = {payload... then it deletes everything I set before...
I was sure I tried your version... but obviously I didnt as this works. Too many {{{}}} got me confused... yeah that makes sense now. I thought it should be easy... Saved it to my library for future ref
Ok so the solution would be to have the value in payload.value then the name in payload.name. I would then set my graph to display payload.value instead of payload. Either way, I had it working anyway (I used nodeName instead of payload.name) and now understand why it would not let me set this, and you have shown me a easier way of setting various objects, so it was worth the exercise. I am slowly feeling a bit more confident programming the function node, I have done a few things now myself without help, but there is still a lot to learn. And I am sure there will be more questions in the future. I do look at the manual, sometimes I can follow what they mean, other times its just way over my head.