[email protected]}}

  • function
can.stache.helpers.key  

[email protected]}}

Insert the property name of an Object or attribute name of a can.Map that we iterate over with #each

Use

Use [email protected]}} to render the property or attribute name of an Object or can.Map, when iterating over it with #each. For example,

The template:

<ul>
  {{#each person}}
    <li> [email protected]}}: {{.}} </li>
  {{/each}}
</ul>

Rendered with:

{ person: {name: 'Josh', age: 27, likes: 'Stache, JavaScript, High Fives'} }

Renders:

<ul>
  <li> name: Josh </li>
  <li> age: 27 </li>
  <li> likes: Stache, JavaScript, High Fives </li>
</ul>