I'm struggling to understand the concept of Nested selections or how to apply it to my specific situation.
Here is an example of the JSON data format I am working with:
{
'name': 'root'
'children': [
{
'name': 'child1'
},
{
'name': 'child2'
}
]
}
My goal is to display the child data within the root node. For instance, if I have the following code:
nodeEnter.append("text")
.text(d.name)
At this juncture, my event handler is the data from the root node. How can I access the child objects' data from there in order to render something like "root (child1, child2)" using the code snippet above?