i have JSON array object coming as request with many fields. I have to send backend request with only limited fields how to achieve this using javascript.
This is how the request look like
{
"Items":[
{
"ItemId":"1",
"manufacturingNo": "Y23",
"catalogID": "123",
"quantity":2
},
{
"ItemId":"2",
"manufacturingNo": "Y33",
"catalogID": "23",
"quantity":29
}
]
}
Required request is
{
"viewItems":[
{
"ItemId":"1",
"quantity":2
},
{
"ItemId":"2",
"quantity":29
}
]
}
how to loop through and achieve this