I am currently doing a basic Pizza Delivery App. So you click on a Pizza you want and it gets added to a list, which is grouping the results.
So it should display:
Pizza Margarita 2x Pizza Salame 1x
I thought about doing a Map like Map<Pizza, number> where Pizza is my object and the number is the amount.
However this doesnt feel right. Also I can't iterate with ngFor through it.
So wouldn't it just be easy to create an object, like: { "pizza": Pizza, "amount": 2} and put this in an array?