JS数组实现分类统计实例代码 将水果数组中同类的水果合并为一条并求出总数varfruits=[{name:'apple',value:1},{name:'apple',value:2}, js数组实现分类统计