let object1 = { "hello" : [5, 12, 8, 130, 44], "hello1" : [7, 12, 8, 130, 44]};
const oldKey = "hello";
const newKey = "hello4;
const index = Object.keys(object1).findIndex(e => e === oldKey);
Object.keys(object1)[index] = newKey;
console.log(object1);
The key is not changing here for some reason.