Hello
I am scarping data from a web and I need to change from string to number. If I try to use this:
msg.payload = Number(msg.payload);
return msg
It doesn´t work for me as in Spain we use "," as "."
The fisrt debug is the data I want to change to number and the second one is what I get.
If the value is 0 it works fine.
Any idea how can I do it?
hi @Rufus,
Are you using function node?
try trim() values befor number().
if you are using change node, try it
if you know the maximum length of each array element that you realy want, you could test element length and exclude element [0] and [1] (for exemple) from your array. it will result in a new array that you can really convert to number.