Revert "use hGetAll instead of hKeys and foreach"

This reverts commit 2ebaf58b76cd1a836b719ad91476bb574572de1e.
Merge pull request #3 from Doomsta/improvement/toArray

Revert "use hGetAll instead of hKeys and foreach"