I needed to test for an undefined JSON variable today. It’s pretty simple.
{{if ImageUrl }}
<img src="${ImageUrl}" alt="${ImageAltText}" title="${ImageTitle}" />
{{/if}}
I found the answer in the comments on the jQuery template {{if}} tag page: http://api.jquery.com/template-tag-if/

Leave a Reply