code: function addLinkToParent(idNode, idParentNode){
      g.addLink(idParentNode, idNode, nodesToBeLinked[idNode].name);
      delete nodesToBeLinked[idNode];
  
      //we remove the node from childrenNodes
      var index = childrenNodes.indexOf(idNode);
      if (index > -1) {
          childrenNodes.splice(index, 1);
      }
  }
docs: Add a link to the graph between the node and its parent
  @param idNode
  @param idParentNode