I'm trying to get data from apex which is in this form Map<String1, List<Map<String2,String3>>>
to use it in javascript before returning a result to the apex controller..
I have tried to do it this way but my webpage keep refreshing and the content of my variable is 'false' ( I have figured this out by using console.log(myVariable); )
<apex:actionFunction action="{!myApexMethod}" name="getResult"/>
<script>
var res = getResult();
console.log(res);
</script>
Controller code..
public String jsonResult{get; set;}
public Map<String,List<Map<String,String>>> myData = getResult();
public void getResult(){
jsonResult = JSON.serialize(myData);
}
It's just a little part the getResult() method is so long to write here.. but you can see what type of object it returns..