我有两个数组 a 和 b
我想根据最新的数组将数组的remarks和附加到数组。delivery_statusabcreated_date_timea
po_number应该用作比较参数。因为它是两个数组中的公共字段
这个怎么做?
a=[{
actual_delivery_date: "2020-10-22"
created_date_time: "2020-10-24T22:18:29Z"
delivery_status: "Delivered"
id: 16
po_number: 1125
remarks: "test"
user: "pruser5"
},
{
actual_delivery_date: "2020-10-22"
created_date_time: "2020-10-24T22:18:29Z"
delivery_status: "Delivered"
id: 16
po_number: 1124
remarks: "test1"
user: "pruser5"
},
{
actual_delivery_date: "2020-10-29",
created_date_time: "2020-10-24T23:02:05Z",
delivery_status: "Late",
id: 22,
po_number: 1125,
remarks: "asd",
user: "pruser7"
}]
b= [{
po_num: 1125,
priority: "Medium",
processId: "30820307",
},
{
po_num: 1124,
priority: "Large",
processId: "30820308",
}]
我想要的输出,
b= [{
po_num: 1125,
priority: "Medium",
processId: "30820307",
delivery_status: "Delivered",
remarks: "test"
},
{
po_num: 1124,
priority: "Large",
processId: "30820308",
delivery_status: "Late",
remarks: "asd"
}]
慕尼黑的夜晚无繁华
一只斗牛犬
相关分类