{{get}}

Reads a property from an object using a dynamic key.

Since Ember 4/5 (Octane) Spec ↗

Syntax

{{get object key}}

Returns

any — The value at the given (possibly dynamic) key.

Examples

{{#each @columns as |col|}}
  <td>{{get @row col.key}}</td>
{{/each}}
{{get this.translations this.locale}}

Notes

Use {{get}} when the property name is computed at runtime, since dot access cannot use a variable key in templates. It is reactive: it updates when either the object or the key changes.