Lua: How to find out if an element is a table instead of a string/number?
snippet in lua

Lua: How to find out if an element is a table instead of a string/number?

user3515

print(type(elem)) -->table

Lua: How to find out if an element is a table instead of a string/number?

user8557

local elem = {['1'] = test, ['2'] = testtwo}
if (type(elem) == "table") then
  -- do stuff
else
  -- do other stuff instead
end