Q:

search array in vue

data: {
    searchTerm: "",
    postList: [
        { "title": "String" }
        ...
    ],
},
computed: {
    filteredList() {
        return this.postList.filter(post => {
            return post.title.toLowerCase().includes(this.searchTerm.toLowerCase())
        })
    }
}
0

New to Communities?

Join the community