let data = [ {hierarchy: '香蕉', count: 1}, {hierarchy: '苹果', count: 2}, {hierarchy: '葡萄', count: 3}, {hierarchy: '梨', count: 4}, ] let sum = data .filter((i) => i.hierarchy != '其他') .map((i) => i.count) .reduce((total, num) => { return total + num }) console.log(sum) => 10