only show the first item in list using Mustache
javascript, mustache
Solution
This solution is working with the new version of Mustache.js (only):
mustache.render("{{a.0}}", {a: ['hi','world']})
=> 'hi'
Problem
I am using the mustache template engine and I only want to display the first item in a long list but cant seem to find the docs for doing so? if I use: ``` {{# links}}<a href="{{& url}}">{{& title }}</a>{{/ links}} ``` i get all of the links, however i only want the first one to be displayed, sounds easy but I cant find any docs on this.