[SalesForce] How to convert Map into Map()

I have map value like

 mapModelLabel >>>>>{GM2 E3A MC M=GM2 E3A MC M, GM2 E3A MS M=GM2 E3A MS M}

code

strJSON= res.getBody();
    system.debug('strJson>>>>>'+strJSON);

Map<String,Object> mapJSON = (Map<String,Object>) JSON.deserializeUntyped(strJSON);
Map<String,Object> mapLocalSemi = (Map<String,Object>)mapJSON.get('localSemiClair');
Map<String,Object> mapMapRep = (Map<String,Object>)mapLocalSemi .get('mapRepresentation'); 
Map<String,Object> mapValues = (Map<String,Object>)mapMapRep.get('map');

I want to convert into map

how can i achieve this ?

Best Answer

So you can try like this

map<string,string> newMap= new Map<string,string>();
for(String strKey: mapValues.keyset())
{
    newMap.put(strKey, String.valueof(mapValues.get(strKey)));
}