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
access array item by index #188
Comments
Hello! |
@locks It's not invalid, either. This is more of an "implementations should do what makes sense in the host language" sort of call. In PHP and JavaScript, this…
is how you would access the title property of the first value in an array called
… is how you'd access the title property of the value at the '0' key of a hash called So in both of those languages, it would be surprising if you couldn't access array elements by index. |
So that template works in mustache.php? |
Yep. And mustache.js |
Hm. I'm not sure I like that, makes the behaviour variable from implementation to implementation. |
I wouldn't recommend it, since accessing things by array index feels like it violates the spirit of mustache to me. But it's possible :) |
hm... okay then! thanks guys! I'll parse it before hand and give everything ready to Mustache. |
hi! is there a way to access an array item by its index position? this way it doesn't seems to work:
I expect
one
to be printed, but I only get an empty string.The text was updated successfully, but these errors were encountered: