How do I remove the “.0” in product quantities?

The value from the e-commerce platform only shows “1”

How do I remove the “.0” in product quantities?
The value from the e-commerce platform only shows “1”
Best answer by Taylor Tarpley
Hi
Welcome to the Community! We’re so glad you’re here!
Does your question pertain to previewing a customer’s event data in an email? If so, this is because the information displayed is a List Data Entry. It is very common to misunderstand the 0 in List Data as the quantity of the product. These List Entries in the event data are numbered starting at 0, not 1, indicating it is the first item in an array of items. The number does not equal the quantity of products in the event. For instance, if {{ event.extra.line_items.0.product.name }} is the variable entry for an image, the 0 indicates that it is the first item in the array (and not that there is no product images).
For more information explaining this, I recommend reading this section of Event Variables In Emails.
Thanks for sharing your question in the Community as I’m sure it will inform many others!
Best,
Taylor
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.