I have mqtt message that have 2 values in;
{"NSPanel":{"id":"7","params":{"switch":"on","switches":[{"switch":"on","outlet":0}]}}}
From this I would like to get id
and switch
.
Is could create 8 channels and filter each by id to get the switch out, but i really don’t like that. Is there a way I can read the whole json into a script and have that do the logic is the script generically for all 8?