-bit of a noobie question, but I have an array that looks like this:
[["john",13],
["jack",12],
["judy",14],
["john",18]]
In the event there is a duplicate name, I would like to remove the element with the highest score, such that it looks like this:
[["john",13],
["jack",12],
["judy",14]]
Standard method of removing duplicates don't work in this case and I am just wondering if anyone knows how this could be done?
Thanks in advance,