It would be cleaner to just use `cart = { 'photo': [], 'video': [] }` then later you can just push the items in based on their type.