Convert Map To Array Typescript Interview