[Vuejs]-JavaScript: How to re-index multidimensional object after deleting a nested object?

0👍

You could try Vue’s delete function in favor of javascript’s delete keyword, so instead of doing delete this.realTagFilters[index][i] you’d do:

this.$delete(this.realTagFilters[index], i);

Another trick to let Vue know data has changed is to replace your object with a new object, like so:

// after you've done your operations:
this.realTagFilters = {...this.realTagFilters};

The last option is this.$forceUpdate() which you are already doing.

Leave a comment