title: Make a heirarchical tree component which has Employee and Manger relation in ReactJs
body: <p>I have a Js object which has both manager IDs and employee IDs, I want to create a ReactJs Tree component that shows all the managers and their employees.
  So if I click on a manager it should expand and show all the employees reporting to him/her.
  How can I do it using Material UI Tree view or any other way?</p>
  <p>The object looks like:</p>
  <pre><code>const empMangerData= [{emp_id: 'EMP001', manager_id: ''},
   {emp_id: 'EMP002', manager_id: 'EMP001'},
   {emp_id: 'EMP003', manager_id: 'EMP001'},
   {emp_id: 'EMP004', manager_id: 'EMP002'},
   {emp_id: 'EMP005', manager_id: 'EMP002'}
   {…}]
  </code></pre>
  <p>This is an example of what I want</p>
  <p><a href="https://i.stack.imgur.com/kRCux.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kRCux.png" alt="This is an example of what I want" /></a></p>