Fix undefined method error

I just needed to remove the each loop and use the right indices for
the hash response.
Merge pull request #1 from jshawl/fix/undefined-method

Fix undefined method error