我有一个具有如下键值对的数组:
[3, "Rey"],[3,"Rhio"],[4,"Rey"],[1,"derter"];
我想得到一个结果数组,这样如果值相同,那么将采用具有最大值的键。如下所示
[3,"Rhio"],[4,"Rey"],[1,"derter"];
我有一个具有如下键值对的数组:
[3, "Rey"],[3,"Rhio"],[4,"Rey"],[1,"derter"];
我想得到一个结果数组,这样如果值相同,那么将采用具有最大值的键。如下所示
[3,"Rhio"],[4,"Rey"],[1,"derter"];