lib/array-tools.js
function pluck (recordset, property) {
  recordset = arrayify(recordset)
  var properties = arrayify(property)

  return recordset
    .map(function (record) {
      for (var i = 0; i < properties.length; i++) {
        var propValue = objectGet(record, properties[i])
        if (propValue) return propValue
      }
    })
    .filter(function (record) {
      return typeof record !== 'undefined'
    })
}
function pluck (recordset, property) {
  recordset = arrayify(recordset)
  var properties = arrayify(property)

  return recordset
    .map(function (record) {
      for (var i = 0; i < properties.length; i++) {
        var propValue = objectGet(record, properties[i])
        if (propValue) return propValue
      }
    })
    .filter(function (record) {
      return typeof record !== 'undefined'
    })
}
function pluck ( recordset , property ) { recordset = arrayify ( recordset ) var properties = arrayify ( property ) return recordset . map ( function ( record ) { for ( var i = 0 ; i < properties . length ; i ++ ) { var propValue = objectGet ( record , properties [ i ] ) if ( propValue ) return propValue } } ) . filter ( function ( record ) { return typeof record !== 'undefined' } ) }
Returns an array containing each value plucked from the specified property of each object in the input array.

@param recordset {object[]} - The input recordset
@param property {string|string[]} - Property name, or an array of property names. If an array is supplied, the first existing property will be returned.
@returns {Array}
@category chainable
@static
@example
with this data..
```js
> var data = [
{ name: "Pavel", nick: "Pasha" },
{ name: "Richard", nick: "Dick" },
{ name: "Trevor" },
]
```

pluck all the nicknames
```js
> a.pluck(data, "nick")
[ 'Pasha', 'Dick' ]
```

in the case no nickname exists, take the name instead:
```js
> a.pluck(data, [ "nick", "name" ])
[ 'Pasha', 'Dick', 'Trevor' ]
```

the values being plucked can be at any depth:
```js
> var data = [
{ leeds: { leeds: { leeds: "we" } } },
{ leeds: { leeds: { leeds: "are" } } },
{ leeds: { leeds: { leeds: "Leeds" } } }
]

> a.pluck(data, "leeds.leeds.leeds")
[ 'we', 'are', 'Leeds' ]
```
Returns an array containing each value plucked from the specified property of each object in the input array .