You cant directly use that as jstl treats the value as a string. You may either need to convert it to some java object in your servlet and use it in jstl. You can do the covertion using jackson or gson or some other library.
Or if you dont want to do all that and keep it simple you can use jquery rather than jstl like
var jsonData = '[ { "id" : 1, "name" : "A" }, { "id" : 2, "name" : "b" }]';
$($.parseJSON(jsonData)).map(function () {
return '<tr class="child"><td>' + this.name + '</td></tr>';
}).appendTo('#myTable tbody');
Where "myTable" is the id of the table.
How to do in controller
You have DetailedJson in your controller. This could be a json array or string. Then in controller you could do the following using gson, then your code should work
String detailedJson = "[ { 'id' : 1, 'name' : 'A' }, { 'id' : 2, 'name' : 'b' }]";
Gson gson = new Gson();
Type listType = new TypeToken<List<Person>>() {}.getType();
List<Person> persons = gson.fromJson(detailedJson, listType);
request.setAttribute("persons", person);
So now your request scope has a list of Person objects with id and name. Your jstl could take this an create table without any change. The person is just a pojo. for eg.
public class Person {
private int id;
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Hope this helps.