will i'm using spring mvc with ajax for my application , my issue is that i don't know how i can iterate a map that i sent from spring controller.
Controller code
ObjectMapper mapper = new ObjectMapper();
String json = "";
try {
json = mapper.writeValueAsString(ser.StatistiquesCompte());
} catch (Exception e) {
System.out.println("erreur ici");
}
return json;
and my ajax code look like that :
$.ajax({
url : 'Stats',
success : function(data) {
alert(data);
}
});
my result is like that : {"Key":10,"Key1",30} how i am supposed to iterate this map.