pluck
Converts an array of objects into an array of values corresponding to the specified key.
- Use
Array.prototype.map()to map the array of objects to the value ofkeyfor each one.
Converts an array of objects into an array of values corresponding to the specified key.
Array.prototype.map() to map the array of objects to the value of key for each one.