Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version of pluck that takes a list of maps rather than varargs #305

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ianroberts
Copy link

This PR adds a function pluckAll which works the same as pluck but expects the dicts-to-pluck-from as a single list-valued parameter rather than a series of varargs parameters. My particular use-case is a Helm chart with data such as this in its values file:

items:
- name: foo
  colour: red
- name: bar
  colour: green

and a template that wants to extract a list containing the colour of each item.

Fixes #304

…eter with a list of values to pluck from, rather than a varargs sequence of map parameters.
@hnq90
Copy link

hnq90 commented Jul 19, 2021

Nice, this is exactly which I need.

@jouve
Copy link

jouve commented Sep 9, 2022

it would be very useful in helm :)

@JuryA
Copy link

JuryA commented Jul 26, 2023

Hey everyone! I was wondering if there are any intentions to merge this Pull Request. It's been in the green for a while and it seems like the feature could be really valuable, not just for me but for others as well. 😎

@emandret
Copy link

Can anybody merge this already? OP opened this PR over 3 years ago.

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: version of pluck that can take a list-of-maps
5 participants