2 title: Load json data in javascript tree
4 js: examples/load_json_data.js
9 <a href="../../index.html">« Documentation</a>
10 <a href="../02_load_json_data_from_server/" class="next">Example 2 »</a>
13 <h1>Example 1 - load json data</h1>
15 <div id="tree1"></div>
18 In this example we load the data using the <strong>data</strong> option.
19 As you can see, the data is an array of objects.
22 <li>The <strong>label</strong> property defines the label of the node.</li>
23 <li>The <strong>id</strong> is the unique id of the node.</li>
24 <li>The <strong>children</strong> property is an array of nodes.</li>
32 { name: 'child1', id: 2 },
33 { name: 'child2', id: 3 }
39 { name: 'child3', id: 5 }