@flyx I guess it's not NEEDED because I can just store it in a table but after using Python year after year it just seems like something natural.
The "solution" based on posts above is: import tables template `.?`*[T](a: T, f: untyped): untyped = a[astToStr(f)] var Thing = initTable[string, string]() Thing.add("name", "value") echo Thing.?name