0

I have following data structure:

{
    'TeamLead': 'Andrew',
    'subordinate': [{
            'Name': 'Daniel',
            'subordinate': [{
                    'Name': 'Steve',
                    'subordinate': [{
                            'Name': 'Steve',
                            'subordinate': [{
                                    'Name': 'Joe',
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

I have to show all subordinates list under team lead in Angular, similar to this and dimension of array is not fixed one :

enter image description here

Please help.

3
  • stackoverflow.com/questions/56376237/… Commented Apr 7, 2020 at 12:11
  • @salahuddin You can always upvote if you like an answer :) Commented Apr 7, 2020 at 15:19
  • @GouravGarg Done :) Commented Apr 7, 2020 at 16:43

1 Answer 1

1

You should use Angular material Tree structure to display these.

This is very simple library to use.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.