use objects for elements with a name key

Signed-off-by: Joern Bernhardt <jb@campudus.com>