Skip to content

Instantly share code, notes, and snippets.

@maephisto
Created March 6, 2015 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maephisto/59eef185fc6ba3422117 to your computer and use it in GitHub Desktop.
Save maephisto/59eef185fc6ba3422117 to your computer and use it in GitHub Desktop.
How to access elements by index in DustJs
{#names}{@idx}
{@if cond="('{.}' == 0)"}
First is: {name}
{:else}
Other: {name}
{/if}
{/idx}{/names}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment