-2

How to get from this array

[{"one": "deleted"}, {"two": "added"}]

this result

{"one": "deleted", "two": "added"}
VLAZ
  • 26,331
  • 9
  • 49
  • 67

1 Answers1

1

you can use Object.assign for that

const data = [{"one": "deleted"}, {"two": "added"}]

console.log(Object.assign({}, ...data))
R4ncid
  • 6,944
  • 1
  • 4
  • 18