js 从一个对象中找到属性值相等的集合

getobjs: function(objs, key, value) {
    var result = [];
    for (var i in objs) {
        var obj = $(objs[i]);
        if (obj.attr(key) == value) {
            result.push(obj[0]);
        }
    }
    return result;
}

getobjs(obj,key,value)

原文地址:https://www.cnblogs.com/Byme/p/7940815.html