useEffect我的reactJS中有以下代碼const A1 = [{id: 1, nome: "Ruan"}, {id: 2, nome: "Gleison"}]const A2 = [{id: 2, nome: "Gleison"}, {id: 3, nome: "Geraldo"}]const results = _.xor(A1, A2);console.log(results)lodashis的邏輯_.xor是返回兩個數組之間的差異,但是,事實并非如此我得到的回報如下0: Object {id: 1, nome: "Ruan"}1: Object {id: 2, nome: "Gleison"}2: Object {id: 2, nome: "Gleison"}3: Object {id: 3, nome: "Geraldo"}我感謝所有提供幫助的努力
lodash 兩個對象數組的差異
萬千封印
2023-08-24 15:57:46