Reputation: 314
I have retrieving the data from json for treeview. When i select the treeview, it will show the data which is belong from same json. How to get the data from json
console.log("select",k.node)
This is used for get the data for selected node. But I want the data from JSON.
Upvotes: 1
Views: 1178
Reputation: 40887
You might do:
var item = this.dataItem(k.node);
You can see it in action here: http://jsfiddle.net/OnaBai/jtgfjz8w/1/
Upvotes: 2
Reputation: 18402
Most widgets have a dataItem
method which gives you the corresponding data item in the data source:
var item = e.sender.dataItem(e.node);
Upvotes: 2