zipObject

Array
since 0.4.0

Arguments

  • Array The property identifiers.
  • Array The property values.

Returns

Object the new object.

This method is like _.fromPairs except that it accepts two arrays, one of property identifiers and one of corresponding values.

Example of Lodash _.zipObject

_.zipObject(['a', 'b'], [1, 2]);
// => { 'a': 1, 'b': 2 }