Remove space string node red

Hello,

I receive a payload a string, I have arrows I can't format the code in JSON
I tried with that

msg.payload = msg.payload.replace(/\n/g," ");
return msg;

it does not work
aaa

bbbbb

Those arrows are tab characters \t not \n

1 Like

Oh, Perfect ^^. Impeccable.
I would like to collect only the numbers.

But I can't use the payload ...

In that case split the string on the tab characters and take the second element. JavaScript String split() Method

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