[Vuejs]-Getting undefined when trying to use a variable in vue

0👍

I guess this is what you need

getCategoryData(slug){
    console.log(this.categories.products[slug]); // change added
}

Leave a comment