Skip to content

Handlebars syntax for the (get) helper #379

@mmun

Description

@mmun

What do you think about introducing a "dynamic access" syntax for Handlebars to streamline or even replace the need for the get helper?

{{planets[name]}}

would be equivalent to {{get planets name}}, and

{{planets[name].closestPlanet[field]}}

would be equivalent to

{{get (get (get planets name) 'closestPlanet') field}}

The second example clearly demonstrates that using the dynamic access syntax makes it easier to understand what is being accessed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions