Typescript Convert Map To Array Javascript Iteration