i need your help with converting mqtt outputs.
I have a bunch of "mqtt in" nodes to recieve messages from a mqtt server.
These messages are sturctured like this:
The payload of these messages need to look like this:
You could use a function node to split the string;
// msg.payload input = "something_german value=192.00 1234567890000"
let m = msg.payload.split(" ")
let name = m[0].trim()
let value = m[1].split("=")[1]
let time = m[2].trim()
msg.payload = {name,value:parseFloat(value),time}
return msg;