4.17.11
3.10.1
2.4.2
1.3.1

_.zipObject([props=[]], [values=[]])

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

Since

0.4.0

Arguments

argument
[props=[]]
[values=[]]
type
Array
Array
description
The property identifiers.
The property values.

Returns

(array)

Example

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