2
array1 = [ { id: "a", score: 1 }, { id: "b", score: 3 }, { id: "c", score: 8 }]
array2 = [ { id: "a", score: 2 }, { id: "z", score: 5 }, { id: "c", score: 1 }]
array3 = [ { id: "a", score: 3 }, { id: "f", score: 2 }, { id: "c", score: 2 }]
如何获得只包含具有id属性值且存在且所有数组都相同的对象的结果数组?即:基于对象属性值的对象数组的交集
resultyArray = [
{ id: "a", score: 1 },
{ id: "a", score: 2 },
{ id: "a", score: 3 },
{ id: "c", score: 8 },
{ id: "c", score: 1 },
{ id: "c", score: 2 }
]