java - How to get the top 10 highest values Json -


so wanted make list of top 10 donators java application , going use json store data that.

so json looks this:

{     "donators": {         "donator1":5,         "donator2":13,         "donator3":8     } } 

now wondering if there sort of efficient way in how store variable name , variable value in list , sort them collections method display top 10 best donators.

would use hasmap this? must dynamic, need able increment values of variables.

help appreciated.

fixed creating donator class 2 fields, jb nizet


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -