title: How to generate a tree for MLM ( Multi-Level Marketing ) in JavaScript for either JSON / XML data
body: <p>I have some data like this : 
  (AT sql sERVER)</p>
  
  <pre><code>MemberID,ParemtID,Amt,OtherInfo
  1,       NULL,    200,dfdsf
  2,       1,       300,DFDF
  3,       1,       400,DFS
  4,       3,       75,NULL
  </code></pre>
  
  <p>Now I want build <a href="http://goo.gl/sogUr" rel="noreferrer">Tree</a> like this : 
  <img src="https://i.stack.imgur.com/HI9Mr.jpg" alt="alt text">
  Only using JS.
  Above data can be passed in JSON / XML / CSV / Formatted Text
  How can i generate such dynamic tree in JS only ?
  Please don't suggest PHP / .NET solutions.
  I would prefer a JQuery.</p>