从下面给定的对象 中删除名为“itemType”的属性的方法是什么?从数组中删除对象
{
"id": 19,
"cost": 10,
"items": 10,
"numbers": 10,
"status": false,
"hours": 10,
"itemType": {
"id": 16,
"name": "PC 350",
"description": "PC 350"
},
"typeid": 12
}
,使最终数组应该像
{
"id": 19,
"cost": 10,
"items": 10,
"numbers": 10,
"status": false,
"hours": 10,
"typeid": 12
}
这里没有数组,没有对象'itemtype'。然而,有一个对象有一个属性'itemtype' – charlietfl
感谢您的纠正。我编辑了问题 – forgottofly
可能重复的[从JavaScript对象中删除属性](http://stackoverflow.com/questions/208105/remove- property-from-javascript-object) –