Use an array for the hash

Could not guarantee the order of the for in loop
when getting the values from the object.