Ich habe diese JSON-einige Werte von Objekt entfernen von json
"SkuList": [
{
"active": null,
"id": 698027,
"productSKUName": "v1",
"productSKUDescription": null,
"productSKUId": "02ffea0f-3d05-44"
},
{
"active": null,
"id": 698028,
"productSKUName": "v2",
"productSKUDescription": null,
"productSKUId": "628acbb9-0bdb-4ccf"
},
]
Wie kann ich diese json filtern und zurückkommen -
"brandProductSkuList": [
{
"id": 698027,
"productSKUId": "02ffea0f-3d05-4436",
},
{
"id": 698028,
"productSKUId": "628acbb9-0bdb-4ccf"
},
]
ich bestimmte Eigenschaften des Objekts entfernen möchten. Wie mache ich das?
es ist wie neues Objekt erstellen, die Sie die gewünschten Werte annimmt. –
Verwenden Sie die Methode [Array # map] (https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/map). – abhishekkannojia
Mögliches Duplikat von [Objekt aus Array mit JavaScript entfernen] (https://stackoverflow.com/questions/10024866/remove-object-from-array-using-javascript) –