Given a keychain and records return the values at the keychain for each record
npm install @unction/pluck![Tests][BADGE_TRAVIS]
![Stability][BADGE_STABILITY]
![Dependencies][BADGE_DEPENDENCY]
> KeyChainType => Array | Set | Record
Given a keychain and records return the values at the keychain for each record.
`` javascript`
pluck(
["attributes", "name"]
)(
[
{
id: "1",
attributes: {
name: "Kurtis",
age: 29,
height: "5'10\"",
},
},
{
id: "2",
attributes: {
name: "Chris",
age: 29,
height: "5'8\"",
},
},
]
)
Which will return:
` javascript``
[
"Kurtis",
"Chris"
]
[BADGE_TRAVIS]: https://img.shields.io/travis/unctionjs/pluck.svg?maxAge=2592000&style=flat-square
[BADGE_STABILITY]: https://img.shields.io/badge/stability-strong-green.svg?maxAge=2592000&style=flat-square
[BADGE_DEPENDENCY]: https://img.shields.io/david/unctionjs/pluck.svg?maxAge=2592000&style=flat-square