On the RIVM site there is a JSON file with information on the covid per town. I have tried several thing to read the JSON but I am not able to read it via dzVents. My knowledge on coding is lacking here. Any help is appreciated.
Here is the data: https://data.rivm.nl/covid-19/COVID-19_ ... atief.json
My idea was to filter based on the Municipality code : GMxxxx
0
Date_of_report "2020-03-13 10:00:00"
Municipality_code "GM0003"
Municipality_name "Appingedam"
Province "Groningen"
Total_reported 0
Hospital_admission 0
Deceased 0
1 {…}
Code: Select all
if (item.isHTTPResponse) then
print("http response")
if item.ok and item.isJSON then
print("succesfull JSON response from RIVM")
-- local json = domoticz.utils.fromJSON(item.data)
-- local result_table = item.json.nodes
-- local tc = #json
dz.log(item.statusCode)
dz.log(item.headers)
-- test = item.data[1]
-- print(test)
-- for i = 1, 100 do
-- if json[i].Municipality_code == gemeente then
-- print("gemeente gevonden")
-- print(i)
-- end
-- end
This is not working at all, so I guess am I not able to read the attributes right in the JSON data.
Any suggestions?