I have two filters which filter the data according to the queue key in the data. Here is my code :
I think you can do it like this. It is not clear what it is exactly what you want to do because your code is overly complicated and badly aligned.
app.filter('searchFilter',function($filter) {
return function(items, searchfilter) {
const terms = Object.values(searchfilter).map(
(val)=>val.toLowerCase(),
);
return items.filter((item) =>
item.queuearr.some((q) => terms.includes(q.queue.toLowerCase())),
);
};
}