Problem is I'm not able to get the map key and its values (which is again a Java ArrayList) in Javascript function
My code is as below:
function myset() {
var mymap="${range}";//range is a java map which is accessible here
// Here I need to display the mymap key and its value (which is an arraylist)
}
<select id="bn" name="bn" onchange="myset()">
</select>
range is a Java map as follows:
List<String> l=new ArrayList<String>();
l.add("123");
l.add("456");
l.add("789");
List<String> ls=new ArrayList<String>();
l.add("222");
l.add("456");
l.add("333");
Map<String,List<String>> m=new HashMap<String,List<String>>();
m.put("123", l);
m.put("456", ls);
Can you please tell me how to display the map key and its concerned arraylist in the above Javascript function?
console.log(mymap);?