I have this function that converts a flat array to a tree based on a path property.
This is my data :
const input = [ {"name":&quo