I have an object with arrays nested inside, as shown in the example below:
{1: Array(4), 2: Array(4), 3: Array(4)}
1: (4) ["11111", "2020-04-02", "14:07", 1]
2: (4) ["22222", "2020-04-02", "14:07", 2]
3: (4) ["3333333", "2020-04-02", "14:07", 3]
(from console log)
In my code, there is an option to add and delete arrays. If I delete the second array for example, it will become like this:
{1: Array(4), 3: Array(4)}
1: (4) ["11111", "2020-04-02", "14:07", 1]
3: (4) ["3333333", "2020-04-02", "14:07", 3]
(from console log)
How can I make the third object become number 2? I want the object to be managed from lowest to highest numbers. Thank you.