Getting Location Values Out Of A Table

I have a table I’ve been using to call specific variables. For example:

  pageOne = display.newGroup() pageTwo = display.newGroup() pageThree = display.newGroup()   myPages = { "pageOne", "pageTwo", "pageThree" }   pageNum = 1   function doSomething()   myPages[pageNum].x = myPages[pageNum].x + someValue   end  

Is there a way to do something like that?

Nevermind fail mistake I missed. Works without the " " quotes inside the myPages table

Nevermind fail mistake I missed. Works without the " " quotes inside the myPages table