use hGetAll instead of hKeys and foreach
Merge pull request #2 from Doomsta/improvement/toArray

use hGetAll instead of hKeys and foreach