I figured out how to save tables ( and load ) but how do I check for specific setting in saved table if it is a dynamic variable?
For example when I save I get this in my .json table:
{ " variable1":“20” , “variable2”:“30” }
Meaning I have this in my code:
variable1 = 20
variable2 = 30
Now how can I check how many variables do I have if I plan to have up to 20 of them?
I tried something like this:
for i=1 , 20 do
if ( myTable.variable … i ~= nil ) then
howManyVariables = howManyVariables + 1
else
i = 20
end
