Morning Team
Could some one give me example of how one would loop through flow context data and get the item name and value
Example:
for (property, value in config_alarm.alarm.zones["10"]){
-- here I expect to get out each property plust its current value
--zone
--state
--state_at
--triggered_at
}
Example Flow Context Data
{
"alarm": {
"beep_zones": {
"beep_zones": "on"
},
"zones": {
"10": {
"zone": "10",
"state": "armed",
"state_at": "",
"triggered": "",
"triggered_at": ""
},
"00": {
"zone": "00",
"state": "armed",
"state_at": "",
"triggered": "",
"triggered_at": ""
},
"01": {
"zone": "01",
"state": "armed",
"state_at": "",
"triggered": "",
"triggered_at": ""
},
"02": {
"zone": "02",
"state": "armed",
"state_at": "",
"triggered": "",
"triggered_at": ""
},
"03": {
"zone": "03",
"state": "armed",
"state_at": "",
"triggered": "",
"triggered_at": ""
},
"04": {
"zone": "04",
"state": "armed",
"state_at": "",
"triggered": "",
"triggered_at": ""
},
"05": {
"zone": "05",
"state": "armed",
"state_at": "",
"triggered": "",
"triggered_at": ""
},
"07": {
"zone": "07",
"state": "armed",
"state_at": "",
"triggered": "",
"triggered_at": ""
}
}
}
}