I install node-red v3.0.2 and I haven't javascript function like length ect.
There is no msg.payload, your array is in array (which is a bad name), but you are using length on msg.payload.
try
msg.payload = [1,2,3,4,5];
let array_length = msg.payload.length;
msg.payload = "Length: " + array_length;
return msg;
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.