1👍
✅
You can use a reducer function for this:
const data = [{
"A": 400
}, {
"B": 1597
}, {
"C": 1567
}].reduce((acc, curr) => {
Object.keys(curr).forEach(key => acc[key] = curr[key]);
return acc
}, {})
console.log(data)
Source:stackexchange.com