I’m struggeling to extract a deep nested JSON value from a MQTT response.
Part of the MQTT message in JSON:
{
"id":925,
"need_ack":1,
"sensorData":[
{
"battery":{
"status":1,
"value":100
},
"co2":{
"status":0,
"value":505
..
}
I want to get the value in ‘co2’. This is what I got so far as value_template, bit it does not work:
"{{ value_json[['sensorData']['co2']['value']] }}"
All examples I could find while looking for the answer were not going further than 2 nestings. Hopefully someone has the magic answer for me