vue search inside array code example
Example: search array in vue
data: {
searchTerm: "",
postList: [
{ "title": "String" }
...
],
},
computed: {
filteredList() {
return this.postList.filter(post => {
return post.title.toLowerCase().includes(this.searchTerm.toLowerCase())
})
}
}