且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用Lotash合并单个数组中的重复对象

更新时间:2022-05-02 17:31:32

var result = _.uniq(json.modules, function(item, key, a) { 
        return item.a;
    });

//Result : [{"name":"Weazel","otherprop":["a","b"]}]