Tag: bootstrap treeview

未捕获的TypeError:无法设置未定义的属性“nodeId”

我在boostrap-treeview.js上收到此错误:267为我的boostrap-treeview检索JSON数据时。 $(document).ready(function() { $.ajax({ url: “js/category_data.php”, method:”POST”, dataType: “json”, success: function(data) { $(‘#doctypesTree’).treeview({ data: data }); } }); }); JSON数据如下: { “2”:{ “id”:”12″, “text”:”Certified copy”, “Description”:””,”root”:”0″ }, “3”:{ “id”:”13″, “text”:”Charter”, “Description”:””, “root”:”0″ }, “4”:{ “id”:”14″, “text”:”Codicil (will)”, “Description”:””, “root”:”0″ }, “5”:{ “id”:”15″, “text”:”Cohabitation agreement”, “Description”:””, “root”:”0″ }, “6”:{ “id”:”16″, “text”:”Collateral assurance”, “Description”:””, “root”:”0″ }, “7”:{ […]