Using .includes on more than one aspect of a prop in Vue to build a search

  laravel, search, vue.js

I’m trying to create a very basic fuzzy search that uses the values of an object in props. The below search works fine, but only checks for

How would I modify this to allow for it to check not only but other values from inside candidate? i.e. how would I go about letting check for example candiate.firstname and candidate.speciality ?

    export default {
    props: ['profiles'],

    data() {
        return {
            search: ''

    computed: {
        filteredList() {
        return this.profiles.filter(candidate => {





    <input type="text" v-model="search">

    <div v-for="candidate in filteredList" :key="">

        <admin-profile-entry :candidate="candidate" :speciality=""></admin-profile-entry>



Thanks in advance.

Source: Laravel

Leave a Reply