We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
May 23, 2022 3:19 PM
I need to utillize logic within an each statement while iterating over the contents of 'extraData'. I would like to apply formatting based on a value within extraData. I cannot figure out the syntax to utilize #if within en each statement and have the if condition operate on the contents of the extraData.
For instance, suppose I have the structure below:
{
item1: "value1",
extraData: {
itemData: [
{ itemTypeID: 1, itemName: "ItemName1" },
{ itemTypeID: 2, itemName: "ItemName2" }
]
}
}
How can loop over the contents of itemData within extraData and format the data based on the itemTypeID?
Thanks so much for your help.
May 31, 2022 11:45 AM
@mangelet I am curious as to if a custom module could be used in the timeline template to solve this as discussed in this post: https://community.hubspot.com/t5/CMS-Development/Timeline-event-template-custom-design/m-p/409898
May 24, 2022 10:02 AM
@lindahl 👋
Maybe you have some thoughts on this subject!
![]() | Make sure to subscribe to our YouTube channel where you can find the HubSpot Community Developer Show |
May 27, 2022 5:10 PM
Thank you for taking a look, Dennis. @lindahl I would appreciate any insight you may have. Thanks so much.