How to get the orginal layername from service

I have a layername landmark in the mapservice whereas it its original layername is landmarkpoint. map.getLayer(map.layerIds[0]).layerInfos[0].name returns me the name displayed for the layer bt not its original name.