Skip to content

Please add a simple "get" function for Dicts #151

Closed

Description

@bitsofinfo

Would be great to just be able to do

{{ $theKeysValue := get $mydict $somekey }}

Activity

  1. bitsofinfo commented on Jul 1, 2019

    @bitsofinfo
    Author

    i need this due to dynamic key names

  2. InvictusMB commented on Aug 9, 2019

    @InvictusMB

    @bitsofinfo
    It is possible to express your case as {{ $theKeysValue := pick $mydict $somekey | values | first }}

  3. bitsofinfo commented on Aug 9, 2019

    @bitsofinfo
    Author

    yes i'm aware and that is what i'm doing, but I think this would be a good feature to add as it is not all that intuitive to someone new to this library.

  4. mattfarina commented on Sep 10, 2019

    @mattfarina
    Member

    PRs are welcome to add this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions