Skip to content

Dig into dict - #254

Merged
mattfarina merged 4 commits into
Masterminds:masterfrom
nyarly:dig-into-dict
Dec 2, 2020
Merged

mattfarina merged 4 commits into
Masterminds:masterfrom
nyarly:dig-into-dict

Conversation

@nyarly

@nyarly nyarly commented Jun 30, 2020

Copy link
Copy Markdown
Contributor

Adds a pipeline-compatible dig function - traverses a list of keys to
return a value, or a default if no value provided.

Future work, if required: allow dig to walk into lists with numeric
indexes.

Closes #227

nyarly added 2 commits June 30, 2020 09:28
Adds a pipeline-compatible `dig` function - traverses a list of keys to
return a value, or a default if no value provided.

Future work, if required: allow `dig` to walk into lists with numeric
indexes.

Closes Masterminds#227
Comment thread dict.go Resolved
@mattfarina
mattfarina merged commit ef25c39 into Masterminds:master Dec 2, 2020
@ruben-gp

ruben-gp commented Mar 1, 2022

Copy link
Copy Markdown

Hi,
I would like to know if it could be possible to expose digFromDict function, as it's also quite convenient to pass an array of strings for using it programmatically to develop (somehow) generic named templates, creating that array automatically.
Thanks a lot in advance.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: dict function, nestedValue

4 participants