4.17.11
3.10.1
2.4.2
1.3.1
_.fromPairs(pairs)
The inverse of _.toPairs
; this method returns an object composed
from key-value pairs
.
Since
4.0.0
Arguments
argument
pairs
type
Array
description
The key-value pairs.
Returns
(array)
Example
_.fromPairs([
["a", 1],
["b", 2],
]);
// => { 'a': 1, 'b': 2 }
_.fromPairs([
["a", 1],
["b", 2],
]);
// => { 'a': 1, 'b': 2 }