for (const i in ringData) {
if (ringData.hasOwnProperty(i)) {
ringData[i].forEach((item: any) => {
if (ber.indexOf(item.groupBy) === -1) {
ber.push(item.groupBy);
}
});
}
}
for (const i in ringData) {
if (ringData.hasOwnProperty(i)) {
ringData[i].forEach((item: any) => {
if (ber.indexOf(item.groupBy) === -1) {
ber.push(item.groupBy);
}
});
}
}
本文标题:typescript for in 循环 判断对象属性是否在原
本文链接:https://www.haomeiwen.com/subject/vlvqxktx.html
网友评论