📅  最后修改于: 2022-03-11 15:04:29.133000             🧑  作者: Mango
var params = [
{ name: 'foo', input: 'bar' },
{ name: 'baz', input: 'zle' }
];
_.reduce(params , function(obj,param) {
obj[param.name] = param.input
return obj;
}, {});