Still strugeling with lua tables...
I want to read the temp from a specific date in a month.
I have a lua table through a json call
Code: Select all
2020-11-09 23:08:00.445 Status: dzVents: !Info: JSON: {
2020-11-09 23:08:00.445 "result" :
2020-11-09 23:08:00.445 [
2020-11-09 23:08:00.445 {
2020-11-09 23:08:00.445 "d" : "2020-10-09",
2020-11-09 23:08:00.445 "ta" : 12.529999999999999,
2020-11-09 23:08:00.445 "te" : 15.0,
2020-11-09 23:08:00.445 "tm" : 10.0
2020-11-09 23:08:00.445 },
2020-11-09 23:08:00.445 {
2020-11-09 23:08:00.445 "d" : "2020-10-10",
2020-11-09 23:08:00.445 "ta" : 10.4,
2020-11-09 23:08:00.445 "te" : 13.0,
2020-11-09 23:08:00.445 "tm" : 8.0
2020-11-09 23:08:00.445 },
etc...How do I access, f.e., the table for date "2020-10-09" to retrieve one of the temperatures.
Do I have to iterate through the whole table? If so, what would be the best way to do this?
TIA for any help.