Here's the scenario:
searchCriteria: {
filter1: [?],
filter2: [?],
filter3: [?],
and so on
}
I am aiming for a boolean
output that indicates whether any of the filter arrays contain data (i.e. are not empty).
Something along the lines of:
const hasDataInFilters = Object.values(searchCriteria).reduce(...);
What method would be most effective in achieving this?