Marty Cochrane Marty Cochrane - 1 year ago 72
Node.js Question

Return array item by index in a meteor spacebars template

I want to access the first item of an array inside a meteor template, I'm using this syntax :


However it doesn't seem like it's working. I don't want to iterate through values using
, just pick the first one from the array.

Answer Source

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


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

Here is the (hidden) docs for this :

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download