-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
The temperature data I receive from the MQTT PLC comes as JSON {"PLC":[{28.6250}]}. I only want to get the value, so I wrote
let inbound = '{"PLC":[{"Temperature":31.5}]}';
try {
let data = JSON.parse(inbound);
return data.PLC[0].Temperature;
} catch(e) {
return 0;
}
but the value is always a constant 31.5. How can I fix this?
Metadata
Metadata
Assignees
Labels
No labels