Return array item by index in a meteor spacebars template Return array item by index in a meteor spacebars template mongodb mongodb

Return array item by index in a meteor spacebars template


This is just a problem of syntax, the correct one is the following :

<p>{{array.[0]}}</p>

Notice the . dot between the array property and the brackets (array indexing) notation ?

Here is the (hidden) docs for this :

https://github.com/meteor/meteor/wiki/Using-Blaze#dotted-helpers-with-numeric-indices