I have an array of objects arr and I want to combine all of the objects in the array into one. There also are repetitive keys in the objects. Is there a way I can do this? Any help would be great.
var arr = [{ a: 1, a: 2 },
{ c: 1, d: 2 },
{ e: 14, f: 20 }];
The output I want is:
var arr = [{ a: 1,
a1: 2,
c: 1,
d: 2,
e: 14,
f: 20 }];
a, andb, and nota, anda, right?