I have a function node that manipulates text and outputs in the following variables.
var out = {payload: [i] + StrIO[i] + Temp[i] };
node.send({payload:out});
I am trying to feed this value into a change node but I have noticed using a debug node that it shows it as payload object not payload string which means the change node does not work.
If I feed my value into the change node using an inject node it works.
So I guess I need to convert the msg object value to a string
As i is a number it will try to do arithmetic addition instead of string. Convert i to a string before concatenating them. Or even better use string interpolation.
You have created an object called out that contains a property called payload. Then in the node.send() call you create another object containing a property called payload which itself contains the out object.
The result is that when you receive that message in the next node msg.payload contains your out object.
Possibly what you meant was node.send(out)