Given this array of objects:
arrayBefore: [
{
a: "string1",
b: 10,
},
{
a: "string2",
b: 20,
},
]
how can one change the keys using JavaScript for the end result of:
arrayAfter: [
{
x: "string1",
y: 10,
},
{
x: "string2",
y: 20,
},
]