find in array in vue js 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())
})
}
}