我有一个看起来有点像这样的对象数组
[ {
"created_date" : "2013-08-12T06:25:00",
"descriptor" : "Noise, Barking Dog (NR5)"
},
{
"created_date" : "2013-08-17T06:25:00",
"descriptor" : "Noise, Barking Dog (NR5)"
},
{
"created_date" : "2013-08-17T02:25:00",
"descriptor" : "Noise, Barking Dog (NR5)"
},
{
"created_date" : "2013-08-12T06:25:00",
"descriptor" : "Loud Music"
},
{
"created_date" : "2013-08-17T06:25:00",
"descriptor" : "Loud Music"
},
{
"created_date" : "2013-08-17T02:25:00",
"descriptor" : "Construction Noise"
},
{
"created_date" : "2013-08-17T02:25:00",
"descriptor" : "Construction Noise"
}]
问题是我如何计算有多少“描述符”类别及其名称我应该如何使用 D3 或 jquery 来解决这个问题。基本上这个想法是形成不同的群体