I am using a network request to read in data in json format, running a decode to create a table.
It seems as though this is working as I am getting the correct tables being created, but when I try to address an element in the table I am getting no joy.
Attached are several images. The VARIABLE window from Lua Glider that shows the that the table schedFlts has 2 elements, each tables and shows the sub-table 1.
Further screenshots show debug results of the variables.
I am trying to read one of the elements in the sub-table - in this case departureAirportFsCode, but it is not working.
“Screenshot schedule Flights Table 1 nil.jpg” shows that the value of table 1 (schedFlts[1]) is nil, but when you look at the variable window it is clear that schedFlts[1] is not nil.
Am I trying to address the field in sub-table correctly?
If you have any suggestions, it would be appreciated.
thanks in anticipation
joncb