title: Counting distinct values from JSON using D3.nest()
body: <p>I have a following JSON: </p>
  
  <pre><code>{  
     "ReturnCode":0,
     "ReturnMessage":"Success",
     "List":[{  
           "Client":"Ad",
           "Department":"DP",
           "ProjectId":"12355",
           "ProjectName":"4940"
        }, {  
           "Client":"Ad",
           "Department":"SP",
           "ProjectId":"12355",
           "ProjectName":"4940"
        }, {  
           "Client":"Ad",
           "Department":"Co",
           "ProjectId":"12355",
           "ProjectName":"asdf"
        }, {  
           "Client":"Ad",
           "Department":"Co",
           "ProjectId":"212355",
           "ProjectName":"45ed"
        }, {  
           "Client":"Ad",
           "Department":"Co",
           "ProjectId":"212355",
           "ProjectName":"45ed "
        }, {  
           "Client":"we",
           "Department":" SP ",
           "ProjectId":"123455",
           "ProjectName":"asdf"
        }, {  
           "Client":"we",
           "Department":"Co",
           "ProjectId":"123455",
           "ProjectName":"asdf"
        }, {  
           "Client":"oc",
           "Department":"Co",
           "ProjectId":"24355",
           "ProjectName":"qwe"
     }]
  }
  </code></pre>
  
  <p>I just need to count the number of projects to each client like below using d3.nest:</p>
  
  <pre><code>[{Key:”Ad”, value:2}, {Key:”we”, value:1}, {Key:”oc”, value:1}]
  </code></pre>