I am trying to use a recursive function for manipulating data to display it in tree-view using angular material tree-view.
Data format I want to convert into: