Got it! I doubt I got the "perfect" solution but it is working. Beside adding the nodes and the related JSON file I also created a own icons value with the same JSON data as for the nodes. For better references etc.

I simply forgot about and did filtered.

nodes.filter((n) => {
            icons.filter((m) => {
                return m.parent ==
            }).style("visibility", "hidden")
            return  n.parent == 
        }).style("visibility", "hidden")       

Related Query