[Vuejs]-Filter() method is not returning any results despite callbackFn does work

2👍

Try with return in your filter function:

return jsonDataPersons.value.filter(
  (person) => { 
    return person.FirstName.toLowerCase().includes(filter.toLowerCase()) 
})

or:

return jsonDataPersons.value.filter(
  person => person.FirstName.toLowerCase().includes(filter.toLowerCase()) 
)

Leave a comment