pluck - Liquid Filter Reference
On this page
Description
Plucks all values for a given property from an list
| Property | Value |
|---|---|
| Return Type | list |
| Category | collections |
Examples
```liquid
{{ products | pluck: “name” | json }} ```
Output: ["Fridgetastic 3000","Coldinator 500","Geronimo 9000","Y2K Amaze"]
```liquid
{{ products | pluck: plucker | json }} ```
Output: ["Fridgetastic 3000","Coldinator 500","Geronimo 9000","Y2K Amaze"]
```liquid
{{ products | pluck: “tags” | json }} ```
Output: [["sale","featured"],["sale"],["featured"],[]]
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.