code: function getNodesByNameHelper(childArray, name) {
    let nodes = [].concat(childArray.filter(element => element.name === name));
    let otherNodes = [];
    childArray.forEach(node => {
      if (hasChildren(node)) {
        otherNodes = otherNodes.concat(getNodesByNameHelper(node.children, name));
      }
    });
    return nodes.concat(otherNodes);
  }
docs: /*
  Helper function for getNodesByName