I would like to know the length of an array read inside a function in NodeRed using JavaScript but it is not displaying/returning any value. Can someone help me here?
Here is the code inside the function block in Node-Red
let j = 0;
let array1 = { payload: msg.payload };
j = array1.length;
return j;
I do not see any return value for j
. any help?
I was expecting a value of 50 for j
to be displayed on NodeRed debug console.