let json
= {
parseJsonKey
: function (key
, obj
, result
) {
if (obj
instanceof Array) {
for (let i
in obj
) {
util
.parseJsonKey(key
, obj
[i
], result
);
}
} else if (obj
instanceof Object) {
for (let i
in obj
) {
let obj2
= obj
[i
];
if (i
=== key
) {
result
.push(obj2
);
}
util
.parseJsonKey(key
, obj2
, result
);
}
}
}
};
转载请注明原文地址: https://www.6miu.com/read-5040219.html