I have some data like this :
(AT sql sERVER)
MemberID,ParemtID,Amt,OtherInfo
1, NULL, 200,dfdsf
2, 1, 300,DFDF
3, 1, 400,DFS
4, 3, 75,NULL
Now I want build Tree like this :

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.
And, here you go:
http://jsfiddle.net/vVmcC/http://jsfiddle.net/vVmcC/4/
You’ll want to style it up yourself, obviously. But this should get you started:
It is by no means an optimal solution. The first loop will become a nightmare for performance the more data you begin loading.