а

Display dhtmlxTreeview


#1

I am new user to dhtmlx controls. I am displaying below data.json in treeview.

	var myTreeView;
	function doOnLoad() {
                	myTreeView = new dhtmlXTreeView("tree_here");
		myTreeView.loadStruct("data.json");                 ------> It is saying undefined.
		//myTreeView.loadStruct("treeview.json");          ----->It is displaying

}

Anybody give comment why it is not displaying.

data.json

[
{
“GetMatchingProductResult”:{
@attributes”:{
“ASIN”:“B01G640T0Y”,
“status”:“Success”
},
“Product”:{
“Identifiers”:{
“MarketplaceASIN”:{
“MarketplaceId”:“ATVPDKIKX0DER”,
“ASIN”:“B01G640T0Y”
}
},
“SalesRankings”:{
“SalesRank”:[
{
“ProductCategoryId”:“ce_display_on_website”,
“Rank”:“6319”
},
{
“ProductCategoryId”:“352697011”,
“Rank”:“32”
}
]
}
}
},
“ResponseMetadata”:{
“RequestId”:“428160d3-ee50-4d58-acab-768e144716d1”
}
}
]


#2

Here you can find an example of the supporting format of the json for the dhtmlxTreeView:
docs.dhtmlx.com/treeview__loadi … jsonformat