Had generated one json array using the filter.
orders = filterFilter(vm.gridOptions.data, {
sampleId: 295
});
Here I filtered my orders array and I got this.
{
"orders": [
{
"orderId": 51491,
"orderDate": "2016-12-19T13:35:39",
"regId": 1354,
"sampleId": 295,
"name": "Test",
"nameAr": "Test"
},
{
"orderId": 51493,
"orderDate": "2016-12-19T13:35:39",
"regId": 1354,
"sampleId": 295,
"name": "Test",
"nameAr": "Test",
}
]
}
Can I filter in way, It should keep only one field in the orders array. Using angular filter I need to do this.
I need an array like this.
{
"orders": [
{
"orderId": 51491
},
{
"orderId": 51493
}
]
}