jashkenas/underscore — pull request #1364 by Fritz-Lium (2013-12-02 05:14:56+00:00)
Title: adding _.draw to underscore#collections

Hi guys!
I suggest that underscore has an API for `draw` values as an array out of a collection.
such as:
_.draw({name: 'moe', age: 50, userid: 'moe1'}, 'name', 'userid');
=> ["moe", "moe1"]
_.draw(['a', 'b', 'c', 'd', 'e'], [0, 3, 1]);
=> ['a', 'd', 'b']

Here is the implementation:
// Draw a list of values from an object/array,
// using a list of corresponding keys/indexes
_.draw = function(obj) {
var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
return _.map(keys, function(key){
return obj[key];
});
};