So I need to perform two actions 1) filter my array and 2) update the unfiltered values. currently, I am doing it this way and it works fine.
let installData = state.installData.filter((item) => {
return item.sensor !== action.data.sensor;
});
installData = installData.map((item) => {
return { ...item, asOfDate: false };
});
however, I am doing operations here and was wondering if there is a more efficient way to update the value of my item directly inside the filtred method without having to use map
installData.const installData = state.installData.filter((item) => ...).map((item) => ...);