how to ForEach through ["name"] cells?
Posted: Thu Apr 02, 2015 9:03 pm
I have table in way of:
What I am trying is following:
By otherwords, I am trying to make every cells "itema" become 0.
But how do i crawl through every cell made this way?
wether i use cell.itema, or data.itema, neither works.
I also tried mytable[cell].itema, but that didnt work either.
So is there any way to access this through ForEach, or is there some other way to do this?
Code: Select all
mytable = {
["cella"] = { itema = 1, itemb=2},
["cellb"] = { itema = 1, itemb=2],
...
}
Code: Select all
ForEach(mytable, Function (cell, data)
data.itema=0
EndFunction)But how do i crawl through every cell made this way?
wether i use cell.itema, or data.itema, neither works.
I also tried mytable[cell].itema, but that didnt work either.
So is there any way to access this through ForEach, or is there some other way to do this?