key-as-array
Get an array of a specific key from an array of object
Install
$ yarn add key-as-array
Usage
const keyAsArray = ;const arr = link: 'a link' useless: 'prop' link: 'a second link' useless: 'prop2' ;//=> ['a link', 'a second link']
API
keyAsArray(input, keyName)
return
Type: array
|| undefined
input
Type: array
Array of similar objects.
keyName
Type: string
Name of the key you want to get.
License
MIT © LasaleFamine