Vue-Tree-Chart icon indicating copy to clipboard operation
Vue-Tree-Chart copied to clipboard

Changing key for children?

Open faaizajaz opened this issue 4 years ago • 0 comments
trafficstars

How can I specify the key for my child nodes? For example, currently this requires us to have data in the form:

{
    "id": 0,
    "children": [
        {
            "id": 1,
            "children": []
        }
    ]
}

I want to be able to specify that nodes are found under the "nodes" key. So I want my starting data to look like this:

{
    "id": 0,
    "nodes": [
        {
            "id": 1,
            "nodes": []
        }
    ]
}

Is there any way to do this without modifying the source?

faaizajaz avatar Jul 19 '21 10:07 faaizajaz