Combine two message payload

WhoAmIWhereAmIWhatIAmDoing picture WhoAmIWhereAmIWhatIAmDoing · Apr 11, 2018 · Viewed 12.1k times · Source

I'm using node-red on one of my projects. And I'm having trouble handling two message payloads in one node. I DO NOT want to deal with them SEPARATELY, instead I want this node to combine both inputs into ONE. All the answers I found online were talked about how to deal with them in sequence, I DO NOT want that. I need to make them into ONE message payload and pass to the next node. Anyone has any insight on this?

Answer

hardillb picture hardillb · Apr 11, 2018

Use the Join node.

enter image description here

This can be set to combine 2 incoming messages so that the new msg.payload is an array containing the msg.payload of the input messages.

enter image description here