Answers for "array object inside an arrar in vue"

0

array object inside an arrar in vue

new Vue({
    el: '#app',
    data:{
        myArr : [
            {
                name: 'object-1',
                nestedArr: ['apple', 'banana']
            },
            {
                name: 'object-2',
                nestedArr: ['grapes', 'orange']
            }
        ]
    },
    methods:{
        changeArrayItem: function(){
            this.$set(this.myArr[1].nestedArr, 1, 'strawberry');
        }
    }
})
Posted by: Guest on November-09-2020

Code answers related to "array object inside an arrar in vue"

Code answers related to "Javascript"

Browse Popular Code Answers by Language