I am new to AJAX and JSON. I have an ArrayList which contains another ArrayList and I converted the whole array in to JSON object:
@Produces(MediaType.APPLICATION_JSON)
public String getRecords(@QueryParam("mobile_no") String mobilenumber) {
UserActivityDelegate delegate = new UserActivityDelegate();
List<AssessmentDTO> list = delegate.getLastFiveAssessment(mobilenumber
.trim());
if (list.isEmpty())
return "Sorry....You have not attended any assessment";
else {
System.out.println(list);
return (new Gson()).toJson(list);
}
Now I want to know how can I retrieve or iterate the response object in JSP using ajax??