I am currently in need of assistance with filtering my data based on brand name and then further refining the results by alphabetical order using the "product.name" property. Provided below are the axios functions I am using for this task.
export default {
data() {
return {
filteredProducts: []
};
},
mounted() {
axios
.get('/src/stores/sneakers.json')
.then(response => (this.filteredProducts = response.data))
},
computed: {
resultCount () {
return Object.keys(this.filteredList).length
},
filteredList(){
return this.filteredProducts.filter(product =>
product.brand.includes(this.brand?.name)
)
}
},
Any help or guidance you can provide would be greatly appreciated.