Javascript Create Table From Array To Hashmap In Typescript