Typescript Loop Through An Hashmap Internally Working