rudiment.js
function(obj, keys) {
    return keys.reduce(function(memo, key) {
      if (obj[key] !== undefined) {
        memo[key] = obj[key];
      }

      return memo;
    }, {});
  }
function(obj, keys) {
    return keys.reduce(function(memo, key) {
      if (obj[key] !== undefined) {
        memo[key] = obj[key];
      }

      return memo;
    }, {});
  }
function ( obj , keys ) { return keys . reduce ( function ( memo , key ) { if ( obj [ key ] !== undefined ) { memo [ key ] = obj [ key ] ; } return memo ; } , { } ) ; }
Return a copy of an object with only the picked keys

@param {Object} obj
@param {Array} keys
@return {Object}
Return a copy of an object with only the picked keys