Multiple outputs , best way

Dear all,

As you can see below, I am trying to get multiple outputs without success, Anyone could tell me what I am doing wrong?
As you can see I am triying with different options but no I dont achieve it...

I should get :
"1" in the first , is OK
"0" in the second, msg1, NO OK.
"1" in the third, msg2, NO OK.

Help , Please!!

you overwrite msg.payload with your first line.

1 Like

Many thanks by the quick answer @E1cid , how could I do it ?

Create a var to hold msg.payload
then reference that var
Let hold = msg; (first line )
then use
msg1 = {"payload": hold.payload.charAt(6)};
edit/ correct error.


let msg1 = {"payload": msg.payload.charAt(7)};
let msg2 = {"payload": msg.payload.charAt(6)};
let msg3 = {"payload": msg.payload.charAt(5)};
return [msg1,msg2,msg3];

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.