I have an array with values
myarray=["Mark:40", "John:20", "Sofia: 60", "Mark:30"]
desiredArray=["Mark:70", "John:20", "Sofia: 60"]
It should check whether the names are unique and if it found same name multiple times, it should add the marks and make the desired array with distinct elements. I am able to get unique array but not able to merge the marks. Could anyone help?