I am trying to use tree hierarchy in D3 and am stuck. I thought I was building JSON correctly, but when I looked at the object in the Developer Tool, I saw the following:

Note that the first line shows that the array of dependents has a length of 0, but when expanded, you can clearly see that the dependents have 3 objects. When I convert it, I get the following:
{"attributes":{"id":0,"name":"root"},"dependents":[]}
Any ideas what could be wrong? Thank!
source
share