Hi,
I’m struggling with the function node. I want to extract the volume number from the string and convert it to a number so I can control a volume slider on the UI.
I have very little knowledge of JavaScript and have cobbled together this code for a function node:
msg.payload = msg.payload.split("Volume:")[1]; return msg;
It kind of gets me to where I need to be but it seems clunky and I’m unable to convert to a number as the output is still delivered as an expression(?)
Any help would be greatly appreciated