Ruby - Enumerable and Collection Processing
How can you group a list of products by category and then by price range (cheap: <50, expensive: ≥50) using nested
group_by calls?
products = [{name: 'Pen', category: 'Stationery', price: 10}, {name: 'Notebook', category: 'Stationery', price: 60}, {name: 'Mug', category: 'Kitchen', price: 40}]