Convert Array Of Objects To Map Typescript Interview