How to search for more than one item with .filter()

How can I make it so i can search for more than one item. Right now I have it so it can only search for name, and I want to be able to search for id and name.

I’ve tried multiple solutions for example this: without success.


const [search, setSearch] = useState('');
  const [masterDataSource] = useState(DataBase);

  const filteredDataSource = masterDataSource.filter((item) => {

   onChangeText={(text) => setSearch(text)}



    id: '1234567788900',
    name: 'AWD',
    company: 'HALDEX',

27 thoughts on “How to search for more than one item with .filter()”

  1. 307169 377661I located your weblog site on google and check a couple of of your early posts. Proceed to sustain up the quite excellent operate. I just extra up your RSS feed to my MSN News Reader. Seeking for ahead to reading extra from you later on! 414015

  2. 928134 636866A lot of writers recommend just writing and composing no matter how bad and if the story is going to develop, you will suddenly hit the zone and itll develop. 776563


Leave a Comment