bootstrap-treeview preparejson code example
Example: how to set JSON data bootstrap treeview with java
var withText = jsondata.map(function(i) {
i['text'] = i['bibliography_text'];
return i;
});
var nestedData = d3.nest()
.key(function(d) { return d.country; })
.key(function(d) { return d.city; })
.entries(withText);