Dynamically load custom JSON data

Hi, I’m trying to load a set of custom JSON data after a button on the page is clicked. Snippet: http://webix.com/snippet/b7da3dc8,

I’m running into the error at line 116 that tree.parse() function is undefined. Other than that, if I try to put tree_json into the tree’s data object, it does not display either.

Thanks for your time.

Check the updated snippet

http://webix.com/snippet/09d596c0

a) In your code snippet “tree” is a var that contains the json structure of the tree, not the tree component. You need to use $$(“tree”) , which will located component by id.

b) parse command must contain the datatype parameter, as by default it will try to parse data as json

c) you need to use tree_json.verilog_modules as parameter of parse, as it contains the array of data which need to be parsed

Thank you for the prompt reply.