Extracts a specified named key from an array of objects.
The array of objects
The property key to extract
An array of the extracted property values
const ids = pluck([{ id: 1 }, { id: 2 }], 'id'); // [1, 2] Copy
const ids = pluck([{ id: 1 }, { id: 2 }], 'id'); // [1, 2]
Extracts a specified named key from an array of objects.