Pluck Values from List Items | ARRAY_PLUCK

Syntax

ARRAY_PLUCK( [value], [key] )

Parameters

value
The ARRAY whose items will be plucked. Should be an ARRAY of OBJECTS / MAPS.

key
A path into each item to pull the value from. For more information on the path syntax used by instalink.io see the dedicated documentation on that subject.

Return Value

An ARRAY with the values pulled from each item within VALUE using the KEY as a path.

Description

Fetches inner values of each item within an ARRAY. If VALUE is not an ARRAY, an empty ARRAY will be returned.

Examples

# VALUE is [["a" => ["b" => 1]], ["a" => ["b" => 4]]]
ARRAY_PLUCK(VALUE, "a.b") # returns [1, 4]
# VALUE is [["a" => ["b" => 1]], ["a" => ["c" => 4]]]
ARRAY_PLUCK(VALUE, "a.b") # returns [1, UNDEFINED]
ARRAY_PLUCK(null, "a.b") # returns []