怎么把 [{key:"a",value:"1"},{key:"b",value:"2"}]转换成{"a":"1","b":"2"}
[{key:"a",value:"1"},{key:"b",value:"2"}].reduce((p, c) => (p[c.key] = c.value, p), {})
1.4m articles
1.4m replys
5 comments
57.0k users