I believe in rest:
will be most efficient.
Looking at below and dropping it in https://jsonpathfinder.com/ I believe the path you’re after is
json_attributes_path: "$[0]"
and not
json_attributes_path: "[0].response"
[
{
"Site_Id": 190,
"Parameter": {
"ParameterCode": "NEPH",
"ParameterDescription": "Nephelometer ",
"Units": "10^-4 m^-1",
"UnitsDescription": "10^-4 m^-1",
"Category": "Averages",
"SubCategory": "Hourly",
"Frequency": "Hourly average"
},
"Date": "2021-09-20",
"Hour": 18,
"HourDescription": "5 pm - 6 pm",
"Value": 0.09,
"AirQualityCategory": null,
"DeterminingPollutant": null
},
{
"Site_Id": 190,
"Parameter": {
"ParameterCode": "PM10",
"ParameterDescription": "PM10",
"Units": "µg/m³",
"UnitsDescription": "microgram per cubic meter",
"Category": "Averages",
"SubCategory": "Hourly",
"Frequency": "Hourly average"
},
"Date": "2021-09-20",
"Hour": 18,
"HourDescription": "5 pm - 6 pm",
"Value": 19.302,
"AirQualityCategory": "GOOD",
"DeterminingPollutant": null
}
]
See here for inspiration on rest:
- this one gives an example of a dynamic json path to handle multiple objects in the array response. e.g. the sample above has two array objects in the response [0] and [1]
See https://jsonpath.curiousconcept.com/ to test a JSONpath expression to total the numbers in each array item.
and here on sensor: