score:3

Accepted answer

Solution:

1.you can assign the JSON data to variable name then You can build the tree layout

2.use one function to get the JSON data

Fiddle for 1 solution

Fiddle for 2 solution

    var root = getData(),
    nodes = cluster.nodes(root),
    links = cluster.links(nodes);

Related Query

More Query from same tag