1. To pass the background action to the front desk, you need to convert the map into json format
Map resultMap;
JSONObject json = JSONObject.fromObject(resultMap);
message = json.toString();
Store multiple items in List student object
2. In the front-end js, first convert the resulting json string into an object
var obj = eval("(" data ")");
3. Traverse the objects in the list
for(var key in obj){ //The first level of loop gets each list
var List = obj[key];
for(var student in List){ //The second level loop takes the objects in the list
alert(List[student ].id);
alert(List[student ].name);
}
}