I have the lua string.
strng = '{{1,2,3},{4,5,6},{7,8,"9+i"}}'
I want to convert strng to table.I know the following solution.
strng = loadstring("return "..strng)()
This solution works when used on strng. However it fails when it is given input from some other function. What I mean is this.
strng = loadstring("return "..somefunction(x))()
Here somefunction(x) gives the string output as {{1,2,3},{4,5,6},{7,8,"9+i"}}
. So it doesn't work in this case. I am seeking for general solution, not for this particular string. However the output will always be of same type( I mean table string).