Refactor to include a DSL and process the value to be returned.
Add a new spec for has_many (basic nested attributes).
Group arrays by nested attributes.