现在有这样一个数组[{key0: '1'}, {key1: '2'}]
[{key0: '1'}, {key1: '2'}]
我想转成这样的一个对象{key0: '1', key1: '2'}
{key0: '1', key1: '2'}
要怎么转一下
[{key0: '1'}, {key1: '2'}].reduce((acc, item) => ({...acc,...item}), {})
548k questions
547k answers
4 comments
86.3k users