Although this is done in vuejs, I strongly believe this is plain javascript related, I have this doc_types array, when I try to assign some value to its index it isn't working, but when I try to push it works fine..
data: function () {
return {
doc_types: [],
}
},
methods: {
populateDocType() {
this.doc_types.push(response.data); //this works
this.doc_types[0] = response.data //this doesn't...no errors though..just the array is unmodified..
}
}
this.doc_types[0]before and after trying to assign data?this.doc_types = response.datawould assign to the array the value (probably an array).