Trying to access the JSON offer in the email template for custom rendering format. The offers are stored as JSON. (Saved the JSON into HTML placemnt)
Trying ways to access JSON as an object in an email template to custom render.
<% let selectedOffer = offer.html['dps:offer-placement:12324324']['sps:offer-activity:32423423'].content %>
{{selectedOffer}}
It throws an error when rendering JSON. Any suggestions would help.
Views
Replies
Total Likes
Hi @KotiSyamala ,
I haven't tried these, but the links below may be useful for you.
Thanks & Regards
You can use the following snippet as an example
{{{offer.html.[dps:offer-placement:19d91803ed87a1a0].[dps:offer-activity:1a9a487ec2b1a708].content}}}
Views
Replies
Total Likes
It'll directly renders the JSON, but wanna capture in a variable and handle with custom rendering.
Views
Replies
Total Likes
Try using it on the following lines
{{#with offer.html.[dps:offer-placement:1a9ce5b1668c0f58].[dps:offer-activity:1a9ce7b236595802].content as |val|}}
{%= val %}
{{/with}}
Views
Replies
Total Likes
This prints the val but what we are trying to do it that it prints offer details with diffrent variation based on profile.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies