I am trying to add an object to the shopping cart. The item contains a key/value pair as shown in the following image: https://i.stack.imgur.com/5inwR.png
Instead of adding the title with its innerText using p and style, I would like to find another way (e.g. Title: de product1).
AddToCart(item) {
let checkOutObj = {
"ID": item["ID"],
"CultureDatas": [{
"Title": item["Title"]["changingThisBreaksApplicationSecurity"]
}]
};
this.ShoppingCard.push(checkOutObj);
}
I have searched online but only found the getElementById option, which is not applicable here. Any ideas or suggestions would be greatly appreciated. Thank you.