This is my array of objects
i need to filter this with name
case one : if i search ‘tali’ filter result from startwith case, same time user enter ‘tali Co OP’ get the result ‘Taliparamba Co Op Hospital’
case two : if i search ‘ath’ get result of ‘Athikkal Saw Mill,Kallai’ and ‘Marhaba Ice Plant Atholi’ beacause Ath contain in ‘Marhaba Ice Plant Atholi’
test = [{ id: 1, name: 'Taliparamba Co Op Hospital' },
{ id: 1, name: 'Athikkal Saw Mill,Kallai' },
{ id: 1, name: 'Marhaba Ice Plant Atholi' },]
4
Answers
i tried this but some case not get
I think below line of code should do the job for you
Please let us know how it goes