我有一个对象数组,我需要通过排除一些元素将值从一个数组复制到另一个数组
[
{
"personId": 1,
"personName": "Steve",
"CarName": "Swift",
"Price": "30L",
"OwnerType": "FirstHand",
"Address" : "xxx yyyy zzzz",
"Model" : "2015"
},
{
"personId": 2,
"personName": "Mike",
"CarName": "Breeza",
"Price": "40L",
"OwnerType": "SecondHand",
"Address" : "yyy uuu tttt",
"Model" : "2013"
},
{
"personId": 3,
"personName": "Elle",
"CarName": "Innova",
"Price": "70L",
"OwnerType": "FirstHand",
"Address" : "TTT RRR EEEE",
"Model" : "2018"
}
]
我想将一个数组中的这个元素复制到另一个只有指定元素的数组,比如
[
{
"personName": "Steve",
"CarName": "Swift",
"Price": "30L",
"Address" : "xxx yyyy zzzz",
"Model" : "2015"
},
{
"personName": "Mike",
"CarName": "Breeza",
"Price": "40L",
"Address" : "yyy uuu tttt",
"Model" : "2013"
},
{
"personName": "Elle",
"CarName": "Innova",
"Price": "70L",
"Address" : "TTT RRR EEEE",
"Model" : "2018"
}
]
我想简单地将第一个数组中的元素复制到另一个没有 ownertype 和 person id 的数组
慕盖茨4494581
相关分类