Python Array Get Function Hashmap Javascript For Loop