I have object like this
[
  { A: '1' },
  { B: '2' },
  { C: '3' },
]
I want convert to like this
{
  A: '1',
  B: '2',
  C: '3',
}
what is the best way to do it
I have object like this
[
  { A: '1' },
  { B: '2' },
  { C: '3' },
]
I want convert to like this
{
  A: '1',
  B: '2',
  C: '3',
}
what is the best way to do it
 
    
    let arr = [
  { A: '1' },
  { B: '2' },
  { C: '3' },
]
console.log(Object.assign(...arr));
 
    
    let arr = [
  { A: '1' },
  { B: '2' },
  { C: '3' },
]
let output = {}
arr.map((obj) => {
    output = {...output, ...obj}
})
console.log(output) 
    
    Object.assign and spread operator will do the trick :
let arrObject = [
   { A: "1" }, 
   { B: "2" },
   { C: "3" }
]; 
Object.assign(target, ...sources)let obj = Object.assign({}, ...arrObject);
console.log(obj) => obj = { A: '1', B: '2', C: '3' }
