P
P
Pavel Padozhnikov2015-10-11 21:01:34
Programming
Pavel Padozhnikov, 2015-10-11 21:01:34

How to convert string to argument?

Based on the question:
from this - "t1[t2][t3][1]"
to transform into this - t1[t2][t3][1]
string to turn into a non-string and non-number argument,
that is: a = t1[t2 ][t3][1] -- in this case the table can be found. The bottom line is that I want to record the path of the table, and then use it for recording or another purpose.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Curly Brace, 2015-10-11
@PaveL152

hm. parse into an array of 4 string elements using a regular expression and then do something like this:
this[arg[0]][arg[1]][arg[2]][arg[3]]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question