After executing an InfluxDB query, I receive a single result row in the following format:
{"result":[[{"result":"_result","table":0,"_start":"2022-01-28T09:00:12.676771291Z","_stop":"2022-01-29T09:00:12.676771291Z","_measurement":"Strom.Heizung.Energie_in_der_letzten_Stunde","_value":14.683000000000117,"_time":"2022-01-29T09:00:12.676771291Z","ts":1643446812676}]],"ts":1643446812684,"error": null}
I'm looking to extract and store the value of the _value key into a variable, for example, value. In this instance, the value is 14.683000000000117.
I attempted to achieve this using the map function:
value = query.result[0].map(elm => (elm._value));
However, the value is returned within brackets like [14.683000000000117]. How can I obtain just the number in my value variable?
Thank you,
Frank