Hi,
I'm trying to read the outputs of a joystick, specifically the vectors x and y.
28/10/2021 23:04:02node: eeebad4a29142066
rested : msg : Object
object
payload: object
angle: object
direction: object
distance: 0
vector: object
x: 0
y: 0
topic: "rested"
socketid: "uf2ZCeo6yMHJHHDTAAAd"
_msgid: "2daacabf5c529c8c"
and I'm doing it with this function:
if(msg.payload){
msg.payload = msg.payload[0][3]['x'];
}
return msg;
I appreciate if someone can correct me.
TIA