I am receiving following data in the form of json
[{
"Id": 1,
"sku": "abc",
"name": "Abbey Black Round Glass and Chrome 3 Tier Stand",
"qty": 14
},
{
"Id": 3,
"sku": "abc",
"name": "Ammy Black Glass and Chrome 5 Tier Corner Stand",
"qty": 0
},
{
"Id": 4,
"sku": "abc",
"name": "Barcelona Adjustable Gas Lift Black Bar Stool (Set of 2)",
"qty": 0
}
]
I have to filter data so that it shows only following key-value pair
sku
qty
Expected result will be
[{
"sku": "abc",
"qty": 14
},
{
"sku": "abc",
"qty": 0
},
{
"sku": "abc",
"qty": 23
}
]
Any solution to filter data in such a format?. I can filter data based on specific values but I want json data containing only two pairs (sku,qty)