accept nested attributes as hash

and convert them to an array