score:0

const items = [{ActFollow: 'BlN', Anurag: 26},{ActSendGift: 'BlY'},{ActSubscribe: 'BlY'}]
    let obj ={}
    items.forEach((item) => {
      obj = {
        ...obj,
        ...item
        }
      })
    console.log(obj)

score:1

const 
  arrOfObjs = [{ ActFollow: "BlN" }, { ActSendGift: "BlY" }, { ActSubscribe: "BlY" }],
  obj = arrOfObjs.reduce((res, o) => Object.assign(res, o), {});

console.log(obj);

score:1

const data = [{ActFollow: 'BlN',ActSendGift: 'BlY', ActSubscribe: 'BlY'}]

console.log([{...data[0],"hey" : "world"}])

score:1

const items = [{ActFollow: 'BlN'},{ActSendGift: 'BlY'},{ActSubscribe: 'BlY'}]

let object = {}
items.forEach(item=>{
  for (const [key, value] of Object.entries(item)) {
    object = {
      ...object,
      [key]: value
    }
  }
})
console.log(object)

Related Query

More Query from same tag