Skip to content

Enable multiple dynamic keys with {{get}} #12263

Closed
@Panman82

Description

@Panman82

Currently, I believe the {{get}} helper is limited to one dynamic key.

{{get someObject keyA}}

I have a case where there are multiple dynamic keys in a path. Eg: foo.bar.baz The current workaround is to use multiple, nested "get's".

{{get (get someObject keyA) keyB}}

What I propose is that the get helper use the remaining params as individual keys.

{{get someObject keyA keyB}} // == someObject.keyA.keyB

It almost acts like a concat helper, but that is not allowed in the current implementation.

{{get someObject (concat keyA '.' keyB)}}

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