Let us say I have a string array with values like -
animal
animal.mammal
animal.bird
animal.reptile
animal.mammal.human
animal.mammal.horse
animal.bird.crow
animal.reptile.snake
When I have to display this array, I want to display it like this -
-animal
-animal.mammal
-animal.mammal.human
-animal.mammal.horse
-animal.bird
-animal.bird.crow
-animal.reptile
-animal.reptile.snake
What should be my approach? I should use group by or filter or what? I am using angular 6 and material UI.
ngforto display on html, angular.io/guide/…