Typescript Array Map Function In Javascript For Object