diff --git a/guides/release/components/helper-functions.md b/guides/release/components/helper-functions.md index d1c01ad3b7..03a1b60838 100644 --- a/guides/release/components/helper-functions.md +++ b/guides/release/components/helper-functions.md @@ -208,9 +208,22 @@ For the full list of available helpers, you can check the [template helpers API ### The `get` helper The [`{{get}}`](https://api.emberjs.com/ember/release/classes/Ember.Templates.helpers/methods/get?anchor=get) -helper makes it easy to dynamically send the value of a variable to another -helper or component. This can be useful if you want to output one of several -values based on the result of a getter. +helper makes it easy to dynamically look up a property on an object or an element in an array. The second argument to `{{get}}` can be a string or a number, depending on the object being accessed. + + +To access a property on an object with a string key: + +```handlebars +{{get this.someObject "object_key"}} +``` + +To access the first element in an array: + +```handlebars +{{get this.someArray 0}} +``` + +To access a property on an object with a dynamic key: ```handlebars {{get this.address this.part}} @@ -219,6 +232,7 @@ values based on the result of a getter. If the `part` getter returns "zip", this will display the result of `this.address.zip`. If it returns "city", you get `this.address.city`. + ### The `concat` helper We mentioned above that helpers can be nested. This can be