I’m writing a REST api that works with SQL and am constantly finding myself in similar situations to this one, where I need to return lists of objects with nested lists inside each object by querying over table joins. Let’s say I have a many-to-many relationship between Users and Groups. I have a User table and a Group table and