Step: Bucket with group_by()
Bucket with group_by()
group_by(f) sorts by f and splits an array into sub-arrays of equal f — an array of groups. Pair it with map to summarize each bucket.
Your turn: for each category, output {category, count} where count is how many products are in it.
Input:
Expected:
Step 21 of 27