Date

“Array” Methods

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

source npm package

This method is like _.zipObject except that it supports property paths.

引入版本

4.1.0

参数
[props=[]] (Array) : The property identifiers.
[values=[]] (Array) : The property values.

返回值
(Object) : Returns the new object.

示例
_.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
// => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }