Javascript Create Table From Array To Hashmap In Python