2016-09-08 13 views
0

lodash v3.10.1it is possible文檔使用_.zipObject這樣這樣的:zipObject在lodash v.4.xx

_.zipObject([['fred', 30], ['barney', 40]]); 
// => { 'fred': 30, 'barney': 40 } 

但在lodash v.4.15.0 I,M剛開這樣:

_.zipObject([['fred', 30], ['barney', 40]]); 
{ 'fred,30': undefined, 'barney,40': undefined } 

回答

0

我在lodash v4.15.0找到了我需要的功能。此功能是fromPairs

相關問題