eg: we have this list:
[
{ "name": "iPhone 14", "category": "Mobile" },
{ "name": "Galaxy S22", "category": "Mobile" },
{ "name": "MacBook Air", "category": "Laptop" },
{ "name": "Dell XPS 13", "category": "Laptop" },
{ "name": "iPad Pro", "category": "Tablet" },
{ "name": "Galaxy Tab", "category": "Tablet" }
]
so i want to display the data in a vertical scroll category wise like this:
Mobile:
- iPhone 14
- Galaxy S22
Laptop:
- MacBook Air
- Dell XPS 13
Tablet:
- iPad Pro
- Galaxy Tab
So I can do this via 3 list view with filters, but woudn't that be redundant?
Like ideally we should only fetch the data once and then filter it into categories. How can i do so?