3👍
✅
This is not VueJS specific. In Javascript you filter an array with Array#filter. Example:
items = items.filter(function(item) {
return item.Title && item.Specifications.some(function(specification) {
return specification.Name === "Watt";
});
});
To understand this have a look at Array#some and Array#filter functions. The above code basically filters the items array by the condition that the item has at least one (some) element in the Specification array where the Name
is “Watt” and has a title.
Source:stackexchange.com