使用reduce为数组对象去重

let arrUnique = function(arr){ let ojb = {}; arr = arr.reduce(function(prevArr, currentItem) { //利用对象的键名无法重复的特点,mch_id是唯一区别的属性值 ojb[currentItem.mch_id

posted on 2023-03-02 14:41  SE7EN_96  阅读(12)  评论(0编辑  收藏  举报

导航