Looking to extract specific values from an array in req.body. I want to loop through and retrieve data like quantity_1 and quantity_2 separately. How can I achieve this? Here is a snippet of my array from req.body:
{
quantity_1: '9',
item_name_1: 'Event Cap Nike',
amount_1: '599',
shipping_1: 'undefined',
shipping2_1: 'undefined',
quantity_2: '1',
item_name_2: 'Plaza',
amount_2: '1000',
shipping_2: 'undefined',
shipping2_2: 'undefined',
cmd: '_cart',
upload: '1',
bn: 'MiniCart_AddToCart_WPS_US',
business: ' ',
currency_code: 'INR',
return: ' ',
cancel_return: ' ' }