Skip to main content

How does one filter an array in klaviyo? 

I would like to something like this - {{ event.extra.note_attributes.filter(a => a.name === 'shopflo_checkout_url')'0].value|default:'' }}

 

I don't want to rely on a static index of 2 as this could keep changing. 
 

Hello @DiscoveryKitchen  Try something like this:

{% for item in event.extra.notes_attributes %}

{% if item.name==”shopflo_checkout_url” %}

// DO SOMETHNING HERE

{% endif %}

{% endfor %}

 

 


Reply