Is there a getattr or a property getter for userdata

264 Views Asked by At

I am trying to get a property of a userdata object. Similair to getattr in many other languages.

Say for variable obj which is a userdata object I want to get a property, but that property is in a variable someVar. Meaning I can't use obj[someVar] I'd have to use something like getattr(obj, someVar).

Is there a way to do this in Lua?

0

There are 0 best solutions below