0
是否有任何简单的方法来删除d3树可视化中的重复的孩子。d3树加入到单个孩子
鉴于数据:
{
name: "certificates",
id: "cert-root",
children: [
{
name: "ISO",
id: "cert-iso",
children: [
{
id: "co-01",
name: "CO-01"
},
{
id: "co-02",
name: "CO-02"
}
]
},
{
name: "HIPPA",
id: "cert-hippa",
children: [
{
id: "co-01",
name: "CO-01"
},
{
id: "co-o2",
name: "CO-02"
}
]
}
]
};
我想作父母,在这个例子中cert-iso
和cert-hippa
点,因为他们有重复ID孩子的单个实例。我知道你可以投射你自己的节点,但是有没有建立它的方式?实现对jsbin