fromPairs

Array
since 4.0.0

Arguments

  • Array The key-value pairs.

Returns

Object the new object.

The inverse of _.toPairs; this method returns an object composed from key-value pairs.

Example of Lodash _.fromPairs

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