I'm triyng to pass an object to Twig. The object is the representation of an Entity, obtained via the
getDoctrine()->getManager()->getRepository(/*repoName*/)->find(id);
This actually works but how can I display all of its values in a html table in Twig? I tried serialization but with no success, maybe I am missing something, please help. Thanks in advance!
UPDATE: What I actually want to achieve is to iterate to that object WITHOUT knowing its keys, a sort of
foreach (field in object) print key, value