0
目前我有非常大的JSON数据,并且在使用JSON数据在Angular JS控制器中处理之前,我想修整版本。如何在Angular JS中删除大Json数组中的Json对象
在下面的JSON数据,我不想有comment
和htmlComment
元素,如何删除这些并有新的非常轻的版本JSON数据I处理数据
这里为了简单起见,我都取得了前简单的JSON数组,但实际上我有非常接近100mb的数据。
我已经thorugh许多问题仍然没有能够让
下面是JSON数据
[
{
"executions": [
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
},
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
},
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
}
],
"currentlySelectedExecutionId": "",
"recordsCount": 210,
"stepDefectCount": 0,
"totalDefectCount": 0
},
{
"executions": [
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
},
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
},
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
}
],
"currentlySelectedExecutionId": "",
"recordsCount": 210,
"stepDefectCount": 0,
"totalDefectCount": 0
},
{
"executions": [
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
},
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
},
{
"id": 241049,
"orderId": 212250,
"executionStatus": "1",
"executedOn": "19/Jul/17 7:42 PM",
"executedBy": "ext1",
"executedByDisplay": "Person1",
"comment": "Comment1",
"htmlComment": "HTML1"
}
],
"currentlySelectedExecutionId": "",
"recordsCount": 210,
"stepDefectCount": 0,
"totalDefectCount": 0
}
]
新增了'Object.assign'来防止原始数据的变化。 –
好的,谢谢! – Batman