We have this JSON data
[{"time":"2020-05-18T19:09:53.000Z","Temperatur":24.1},{"time":"2020-05-18T19:09:58.000Z","Temperatur":24},{"time":"2020-05-18T19:12:48.000Z","Temperatur":23.9},{"time":"2020-05-18T19:13:27.000Z","Temperatur":24},{"time":"2020-05-18T19:13:33.000Z","Temperatur":23.9},{"time":"2020-05-18T19:13:48.000Z","Temperatur":24},{"time":"2020-05-18T19:13:55.000Z","Temperatur":23.9},{"time":"2020-05-18T19:16:33.000Z","Temperatur":23.8},{"time":"2020-05-18T19:17:46.000Z","Temperatur":23.9},{"time":"2020-05-18T19:18:26.000Z","Temperatur":23.8},{"time":"2020-05-18T19:19:12.000Z","Temperatur":23.8},{"time":"2020-05-18T19:21:07.000Z","Temperatur":23.9},{"time":"2020-05-18T19:21:13.000Z","Temperatur":23.8},{"time":"2020-05-18T19:24:32.000Z","Temperatur":23.7},{"time":"2020-05-18T19:24:51.000Z","Temperatur":23.8},{"time":"2020-05-18T19:25:50.000Z","Temperatur":23.7},{"time":"2020-05-18T19:29:19.000Z","Temperatur":23.7},{"time":"2020-05-18T19:29:25.000Z","Temperatur":23.7},{"time":"2020-05-18T19:29:35.000Z","Temperatur":23.8},{"time":"2020-05-18T19:29:42.000Z","Temperatur":23.7},{"time":"2020-05-18T19:29:48.000Z","Temperatur":23.7},{"time":"2020-05-18T19:32:47.000Z","Temperatur":23.6},{"time":"2020-05-18T19:35:00.000Z","Temperatur":23.7},{"time":"2020-05-18T19:35:06.000Z","Temperatur":23.6},{"time":"2020-05-18T19:36:07.000Z","Temperatur":23.5},{"time":"2020-05-18T19:36:19.000Z","Temperatur":23.6},{"time":"2020-05-18T19:39:22.000Z","Temperatur":23.5}]
Getting maximum temperature is easy with $max(Temperatur)
. But how can be extracted the corresponding timestamp?
You can order the array by decreasing temperature, then select the first item in the array:
$^(>Temperatur)[0].time