code: function searchNodeInTree(treeRoot, nodeId){
      if (treeRoot.childNodes){
          for (var i = 0; i < treeRoot.childNodes.length; ++i){
              var currentNode = treeRoot.childNodes[i];
              if (currentNode._id == nodeId){
                  return currentNode;
              } else {
                  var found = searchNodeInTree(currentNode, nodeId);
                  if (found) {
                      return found;
                  }
              }
          }
      }
      return false;
  }
docs: Depth First Search algorithm that returns the node and its children with the id "nodeId"
  @param treeRoot
  @param nodeId
  @returns {*}