I have a js object with id formatted like {'1': ['property1', 'property2'...], '2': ['property1', 'property2'...]...}
I'm using an object rather than a list incase I want to name the properties later.
I used the js code
for(i = 0; i < Object.keys(currentFile).length; i++) {
if(i == activeBoxId) {
delete currentFile[i];
};
if(i > activeBoxId) {
currentFile[i - 1] = currentFile[i];
delete currentFile[i];
};
to try and preserve numerical order while delete one of a specific index to avoid errors in not finding the id number. It doesn't seem to work however, as when I print currentFile, it goes something like 1, 2, 3, 5, 6 - deleting the property I want, but not seeming to delete the next one. Any way you can help?