Pass entire array option in productListItem array
During analytics implementation using websdk I am getting a product array using ACDL on website for commerce events and want to fetch those value in launch and pass it as entire array in xdm data element mapping. Also, need to pass some of the values as evars and events in product string. What should be the best practice or sample code to traverse through the array and create an object that can be directly mapped as array.
sample datalayer code:
window.adobeDataLayer.push({
product: {
"productListItems": [
{
"Qty": 18,
"brand": "ABC",
"category": "DEF",
"StarRating": 4.4792,
"sku": "12345",
"stockStatus": "in stock",
}
{
"Qty": 20,
"brand": "ABCD",
"category": "GHIJ",
"StarRating": 4.4,
"sku": "12345",
"stockStatus": "in stock",
}
]
}
});


