I have the following object:
obj = {
a: 1,
b2: 2,
...
}
I need to replace prop 'a' with 'a1' and the new prop to be the very first. Is it possible? The code below doesn't fit as
obj.a1 = 1
delete obj.a
results in
obj = {
b2: 2,
...
a1: 1
}