Вы можете filter
из массива
const items = [
{code: "1", fruits: "APPLE", color: "red"},
{code: "2", fruits: "BANANA", color: "dummy"},
{code: "3", fruits: "BANANA", color: "anotherDummy"},
{code: "4", fruits: "ORANGE", color: "orange"}
];
const keyword = 'BANANA';
const filter = items.filter(item => (item.code === keyword || item.fruits === keyword ||item.color === keyword));
console.log(filter);
Также для нескольких фильтров / поиска
const items = [
{code: "1", fruits: "APPLE", color: "red"},
{code: "2", fruits: "BANANA", color: "dummy"},
{code: "3", fruits: "BANANA", color: "anotherDummy"},
{code: "4", fruits: "ORANGE", color: "orange"}
];
const keyword = ['APPLE', 'BANANA'];
const filter = items.filter(item => (
keyword.includes(item.code)
|| keyword.includes(item.fruits)
|| keyword.includes(item.color)
));
console.log(filter);