list_pluck

Retrieves unique values from a list.

Example

1
2
3
{{ $source | list_pluck: 'sku_id', 'sku_name' }} => [
[key => 1, value => 'sku_1'],
]

Input

Type Parameter Description Required
array source The list to retrieve unique values from. Comes before the | sign. Required
string keyAttr The attribute to use as the key, defaults to null  
string valueAttr The attribute to use as the value, defaults to null  

Output

Type Description
array The unique values from the list