Skip to content
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

Display only first item in array #74

Open
difrnt opened this issue Mar 26, 2013 · 3 comments
Open

Display only first item in array #74

difrnt opened this issue Mar 26, 2013 · 3 comments

Comments

@difrnt
Copy link

difrnt commented Mar 26, 2013

Is there something built into tempo to allow you to display only the first item in a array?
I have a json object that has multiple arrays inside of it. I want to display only the first item in each of the arrays. I can do this with some javascript intervention and {{_tempo.index}}, just was curious if there is another/better way.

@mrolafsson
Copy link
Contributor

There isn't but it would be a very good idea...how about something like adding attributes data-first="0" data-last="10"?

@difrnt
Copy link
Author

difrnt commented Mar 27, 2013

Sounds good to me. That or something like {{var[0]}} would work to if they wanted something more specific.

@mrolafsson
Copy link
Contributor

Sorry for radio silence on this. Are you still using Tempo? Would you be interested in it's continued development?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants