In the html node where you store the id(probably an hidden field?) add a Css class say idContainer. Then you can get the node with a given id with something like:
$(".idContainer[value='1111213']") where 1111213 is the id you are looking for. This way you get the hidden filed containing the id. Once you get the hidden filed with the id you need you can go to the root of each node by putting a css class in the
container of each node ( it should be a span or a div), say treeNode.
Now with: $(".idContainer[value='1111213']").closest(".treeNode")
Now suppose that uìyou want to go to the url contained in link that is in the node you can take its href with:
$(".idContainer[value='1111213']").closest(".treeNode").find("a").href.......and so on. I hope you got the idea...so you can adapt it to your case.