Q:

Search into a node ID in D3

I am doing a Tree, using Mike Bostock Tidy Tree
With the help of some people here, i did a function to highlight nodes the path from the node i put my mouse in, to the root. 
I also did a simple function that reset the colors/stroke by reseting all nodes and links colors.
But now i want to highlight some path between a node to another passing through the root.
For example if i have an exterior node called ABC connected to another exterior node called XYZ it will highlight ABC to the root and XYZ to the root so we can see both are connected.
To make the computer understand i thought of two ways, adding a tag at the end of the id, like #1 for each exterior node which pair another or adding a value to the nodes like 12, both on the csv file.
After that i want the script to check all nodes to find the one with the same ending id or value (of the node i have my mouse on) and highlight from this one to the root using the same way i did for the node hovered.
So which idea is better ? Is it even possible ? Can i access a node id and check the string or access a node value ? And if yes, how can i do it ? 
i thinked of this : d3.selectAll("node[value='12']"); for the value for example, but this way i don't know  how to get back to his parents using my method.
The method i use to change the color is this one : Highlight parent path to the root
Can anyone help me on this ? 
Thanks !

A:

Okay, i managed to do it, i created a temporary variable on mouseover. 
The id and value were on an object called data in the node, so i have to access data before the actual attribute i wanted. You can replace value with id or simply data.value by the attribute you want to get.
node.on("mouseover", function(p) {

if(p.data.value != "")
{ 
  var temp = p.data.value
  console.log(temp)
}

Then check if the value is paired with another node on the graph and do the highlighting the same way you did for the first node but on the node paired.

