I am using an array.filter() function to remove all the objects where one of their attribute is equal to any of the string in a given array. The objects in the array are crypto trades and I need to filter out the trades with the trade pairs that I do not want. How would I achieve this using the filter function? For now, I tried this which did not work evidently:
filteredPairs = filteredPairs.filter(
(pair) =>
!pair.symbol.includes(
"USDTBUSD",
"USDTUSDC",
"USDTUST",
"USDTUSDP",
"USDTDAI",
"BUSDUSDT",
"BUSDUSDC",
"BUSDUST",
"BUSDUSDP",
"BUSDDAI",
"USDCUSDT",
"USDCBUSD",
"USDCUST",
"USDCUSDP",
"USDCDAI",
"USTUSDT",
"USTBUSD",
"USTUSDC",
"USTUSDP",
"USTDAI",
"USDPUSDT",
"USDPBUSD",
"USDPUSDC",
"USDPUST",
"USDPDAI",
"DAIUSDT",
"DAIBUSD",
"DAIUSDC",
"DAIUSDP",
"DATUST"
)
);
This is not filtering out these pairs. Any insight would be helpful. Thank you.