This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

How to refer directly to the cell of the table with a name "1"?
#1
Do you know how to refer to the table which has a name "1" in this case?
Code:
log(data.1.period)
I solve this problem in this way:
Code:
data1 = data[1]
log(data1.period)

but do you know how to do this without any additional code?
Reply
#2
You must use square brackets when accessing numeric indexes, try this:
Code:
log(data.forecast.simpleforecast.forecastday[1].period)
Reply
#3
(05.10.2015, 11:28)admin Wrote: You must use square brackets when accessing numeric indexes, try this:
Code:
log(data.forecast.simpleforecast.forecastday[1].period)

ThanksWink
Reply


Forum Jump: