title: Create hierarchy from csv in d3.js
body: <p>I have a csv with the following data:</p>
  
  <pre><code>world,country,state
  
  World,US,CA
  
  World,US,NJ
  
  World,INDIA,OR
  
  World,INDIA,AP
  
  World,INDIA,TN
  </code></pre>
  
  <p>I need to convert in to a tree hierarchy as shown below:</p>
  
  <pre><code>{
  
      "name": "World",
      "children": [
        { "name": "US",
            "children": [
             { "name": "CA" },
             { "name": "NJ" }
           ]
        },
        { "name": "INDIA",
            "children": [
            { "name": "OR" },
            { "name": "TN" },
            { "name": "AP" }
           ]
        }
   ]
  };
  </code></pre>
  
  <p>Then this tree will be used for tree visualization. Can any one help on this?</p>