I have a map that structure like this:
"Alex": [Work(workPlace="workPlace", years=1),
Work(workPlace="workPlace", years=4),
Work(workPlace="workPlace", years=5),
Work(workPlace="workPlace", years=1)],
"John": [Work(workPlace="workPlace", years=2),
Work(workPlace="workPlace", years=2),
Work(workPlace="workPlace", years=1),
Work(workPlace="workPlace", years=6)]
What is the best way to sum the values?
For exampe, How can i sum all the years of Alex and John?