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

lua, lua-table

Solution

print(type(elem)) -->table

the type function in Lua returns what datatype it's first parameter is (string)

Problem

As the title says, what function or check can I do to find out if a lua element is a table or not? ``` local elem = {['1'] = test, ['2'] = testtwo} if (elem is table?) // <== should return true ```

Original source