Why does this syntax work:
if ({A=1,B=1,C=1})["A"] then print("hello") end
while this does not:
local m = {string.sub(string.gsub("A,B,C,", ",", "=1,"),1,-2)}
if (m)["A"] then print("hello") end
???
I think it's because a string is not an array, but how can I convert a string ("a,b,c") to an array ({a=1,b=1,c=1})?