dogs.rb submission for iterating arrays of hashes