-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing Array item by index in template #158
Comments
|
Thanks, I'll give that a try. |
Indeed, if you're using 0.5 (currently on master) you can do something like this:
|
this should be on the documentation, it's very usefull. You can even do this if you are int he current item: {{0}} |
how can I use another {{variable}} as the index? |
@piazera You can't. Mustache feels like that's one step too far over the "logic-less" line. |
Why can't mustache do this like a normal person and use [0] for indexing? This is really messy. |
ll is a two item array [47, -122]
Is this valid or do I have to write a function to extra the item at index I want?
Thanks!
The text was updated successfully, but these errors were encountered: