pluck()

Creates a copy of the given array making each item the value of the given property name.

This function is valid in v2.24.0 to v2.24.2. This function has been downloaded 4 times.

Parameters

{Array} array
Array to copy.
{string|number|Array} path
Name of or path to the property of each array item that will replace the corresponding array item. If this is a negative number and the array items are arrays this will be used as the index counting from the end of those arrays.

Returns

{Array}
Copy of arra where each item is replaced by one of its properties as specified by propName.