Hi All
I am using node red 3.0.3 and node js v18.16.0 in a raspberry pi. A flow storage (gravity sensor) in my program is generating an object with many fields. I want to know how can I get one of the fields ,this field should be number, so I guess that the field should be converted to a integer. How can I do that?
This is the object structure (in fact has more fields), the only field that I need is called "minor"
object
uuid: "a495bb50c5b14b44b5121370f02d74de"
major: 999
minor: 1004
tx_power: -103
rssi: -63
mac: "c9:23:5f:60:d3:23"
Color: "ORANGE"
According to you image minor is already a number (shows blue in debug) If you hover your mouse over the minor name you will see three icons. One is copy path, If you copy it and paste it in a change node you can move the value where ever you wish.
In a change node to move it to msg.payload
set msgpayload
to value of msg.payload.minor