0👍
the below code will return you 2 works as you wished for.
let filteredArrayOfObjects = this.works.filter(function (item) {
return item.sort === '2019';
});
console.log("You will get two objects returned here" + filteredArrayOfObjects)
and here it is filtering array of objects based on condition, not array of array.
- [Vuejs]-Bootstrap 4 Modal with JavaScript and Vue: $ is not defined at eval
- [Vuejs]-How can I make a v-for loop inside a Bootstrap grid?
Source:stackexchange.com