JSON fields with a '-' (hyphen) in their name
Posted: Wednesday 04 April 2018 14:18
Help - I'm trying to update some devices using the JSON being returned from a call to a device. However, the fields/variables are all named with a hyphen (e.g. door-state, light-state, etc.). When I try to assign these to a variable in dzVents, (local garage_door = item.json.door-state), I get an error "... attempt to perform arithmetic on field 'door' (a nil value)". I assume this is because of the '-' and trying to subtract state from door. How can I uses this naming convention in dzVents?