First i will have a JSON String:
{"API_Name__c":["values 1","value2"],"API_Name2__c":["value3","value4"]}
Here is my apex controller:
public static List<Object> getObject(String filter) {
System.debug('Here is String of map: ' + filter);
Map<String, List<String>> filterMap = ( Map<String, List<String>>)JSON.deserializeUntyped(filter);
System.debug('Here is map: ' + filterMap);
}
It will give me this Error:
Invalid conversion from runtime type Map<String,ANY> to Map<String,List<String>>
How should i fix this? Thanks for helping!