假设现在有一个对象数组 我想去掉相同的id 然后保留各个id的最后一项arr = [{ id: 1, content: 'a'},{ id: 2, content: 'b'},{ id: 2, content: 'c'},{ id: 3, content: 'd'},{ id: 3, content: 'e'},{ id: 3, content: 'f'},{ id: 3, content: 'g'},{ id: 4, content: 'h'}]
添加回答
举报
0/150
提交
取消