I have a search functionality here in Vue js for data coming from API and it works fine on a single data item (question.questionTitle
) but my problem is I can't figure out how to apply it on all data like question.name
, question.desc
... is there a way to do it?
<template>
<ul
class="container-question"
v-for="(question, index) in questions"
:key="index"
>
<div v-for="(questions,index) in filteredList" :key="index">
......
</div>
</ul>
</template>
<script>
filteredList() {
return this.questions.filter(question => {
return question.questionTitle.includes(this.search)
})
}
</script>