Accessing custom attribute array in d3js tree node

154 views Asked by At

I am pretty new to the D3JS library but is it possible to add a custom attribute to the json file for the tree layout to process and retrieve the data while building the tree if the particular attribute is not empty?
For example:
{ "name": "Josphen", "id": "1", "children": [ { "name": "Ronald", "id": "3" }, { "name": "Coxy", "id": "4", "spouse": [ { "name": "baby", "id": "5" } ] } ] }
Would later allow me to retrieve attribute with id=5 while generating the node of id=4.
Any insight into this is appreciated.

0

There are 0 answers