I have an object or array (i am not sure) that looks like this:
0:{62: "01:30:00 - 01:45:00"}
1:{61: "01:30:00 - 01:45:00"}
2:{55: "03:15:00 - 04:15:00"}
...
My goal is to make it look like this:
62:"01:30:00 - 01:45:00"
61:"01:30:00 - 01:45:00"
...
I need to keep the same order as in the first object this is very important. I've tried this but the result is the exact same.
finalOptions = [];
for (var newKey in newOptions) {
finalOptions.push(newOptions[newKey]);
}
console.log(finalOptions);