HELP!! Syntax issues in HTML using Liquid Template Syntax functions
Help! I have an issue where I have to append a coupon to an email. My coupons are stored in a separate data set, and I initially was able to use this code to append a coupon:
{% let coupon = head(profile._********.walletInfo.couponDetails) %} {{coupon.couponId}}
However - I have duplicate ID's that now exist in this dataset and the head() function grabs the first instance (the old coupon). I've tried using this code:
{%#for coupon in profile._********.walletInfo.couponDetails %} {%#if coupon.campaignName == "Birthday_Coupon_2025" %} {{ coupon.couponId }} {% endif %} {%endfor %}
But I get the following validation error:

What am I missing here? Please help!