Pluck method with fixed key #48953
Unanswered
migueliriano
asked this question in
Ideas
Replies: 1 comment 3 replies
-
Unfortunately, passing an array to the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What do you think about extending Pluck to retrieve all of the values with a fixed key ?
For example in this collection, I want the
name
values but with a fixed key calledproduct_name
Example code:
So the idea as you can see in the example, is extending the Pluck method of the collection to accept an array where the first index is the fixed key value
product_name
and the other is the column that you want to retrievename
.Beta Was this translation helpful? Give feedback.
All reactions