# Example 1 - load json data

In this example we load the data using the data option. As you can see, the data is an array of objects.

- The label property defines the label of the node.
- The id is the unique id of the node.
- The children property is an array of nodes.

    var data = [
        {
            label: 'node1', id: 1,
            children: [
                { label: 'child1', id: 2 },
                { label: 'child2', id: 3 }
            ]
        },
        {
            label: 'node2', id: 4,
            children: [
                { label: 'child3', id: 5 }
            ]
        }
    ];

    $('#tree1').tree({
        data: data
    });