I\'m trying to filter a list by tags:
const initialState = [ {id:1 ,name: \'Product A\', image: \'pic-001.jpg\', tags: [\'nature\', \'campi
Like that?
const filter = 'nature'; const filteredResult = initialState.filter((item) => { return (item.tags.indexOf(filter) >= 0); });