there are two sets of data
let a = [
{
brandName: "aaa",
brandId: "75",
},
{
brandName: "bbb",
brandId: "12",
},
{
brandName: "ccc",
brandId: "16",
}
]
let b = [
]{
voteid: 12,
totolnumber: 110
},
{
voteid: 16,
totolnumber: 220
},
{
voteid: 100,
totolnumber: 20
},
{
voteid: 75,
totolnumber: 20
}
]
how can you match two id and form a third array?
let c = [
{
brandName: "aaa",
brandId: "75",
totolnumber: 20
},
{
brandName: "bbb",
brandId: "12",
totolnumber: 110
},
{
brandName: "ccc",
brandId: "16",
totolnumber: 220
}
]