deepTreeDive = (tree, ids) => {
  if (ids.length > 1) {
    return deepTreeDive(tree[ids[0]].children, ids.splice(1, ids.length));
  }
  return tree[ids[0]];
}
Flatten tree
@param {object} tree
@param {array} ids