You need to sign in to do that
Don't have an account?
Rahul Allada
error: Illegal assignment from Object to Map<String,String>
String input = '{"orgId":{"isRequired":"true", "valiateDataType": "Id"},"numOfVehicles":{"isRequired": "true"}}'; Map<String,object> o = (Map<String,object>) JSON.deserializeUntyped(input); map<string,Id> mapsOfIds = new map<string,Id>(); mapss.put('orgId','003J000001q24JUIAY'); for(string key : mapOfIds.keyset()){ map<string,string> mapIter = o.get(key); }
I have a code as above and i am getting the error Illegal assignment from Object to Map<String,String> at last line where i am assigning mapIter.
In the last line 'o.get(key)' returns an object. it cannot be assigned to map.
You can change the code to following\ Thanks
Surya G