Hi
I am trying to transform with a rule JSON data coming from website.
The JSON structure is pretty complex, and I’m a newbie at JSONPATH. I’ve tried test rules / logs and website (http://jsonpath.com/) with little success.
Goal is to retrieve weather forecast daily, and parse results to update items.
For example, I would like to get to get single “temperature : 2m” data.
I’ve tried : $…temperature.2m , which sends an array of all temperature/2m data.
Anything beyond this I’ve failed.
Thanks for any help.
{
"request_state":200,
"request_key":"xxx",
"message":"OK",
"model_run":"02",
"source":"internal:GFS:1",
"2020-09-12 05:00:00":{
"temperature":{
"2m":291.7,
"sol":293.3,
"500hPa":-0.1,
"850hPa":-0.1
},
"pression":{
"niveau_de_la_mer":101790
},
"pluie":0,
"pluie_convective":0,
"humidite":{
"2m":65.1
},
"vent_moyen":{
"10m":6.7
},
"vent_rafales":{
"10m":8.9
},
"vent_direction":{
"10m":259
},
"iso_zero":4005,
"risque_neige":"non",
"cape":0,
"nebulosite":{
"haute":20,
"moyenne":0,
"basse":0,
"totale":20
}
},
"2020-09-12 11:00:00":{
"temperature":{
"2m":297.4,
"sol":296.4,
"500hPa":-0.1,
"850hPa":-0.1
},
"pression":{
"niveau_de_la_mer":101990
},
"pluie":0,
"pluie_convective":0,
"humidite":{
"2m":41.8
},
"vent_moyen":{
"10m":10
},
"vent_rafales":{
"10m":12.1
},
"vent_direction":{
"10m":302
},
"iso_zero":3980,
"risque_neige":"non",
"cape":0,
"nebulosite":{
"haute":12,
"moyenne":0,
"basse":0,
"totale":12
}
}
}