我有一個像let arr = [ {isManaged: true, id:1}, {isManaged: false, id:2}, {isManaged:false, id:3}]要獲得正確的值,我愿意arr.map(shift => ({ id: shift.id, isPartnerManaged: shift.isManaged,}))但這只會返回我真實的值,現在,我想從對象數組中刪除它們。我嘗試使用 ,array.pop但我不知道用什么索引來喂它。有什么想法嗎?
根據對象鍵值從對象數組中刪除對象
海綿寶寶撒
2021-06-29 09:06:29
