Sorting a JSONArray by one of its values

Oh, I thought I wrote that i wasnt able to utilize the examples found on google in processing.
I have no code regarding my question. Added some slightly edited code from processing.org/reference/JSONArray.html as I dont plan posting a 1k+ lines project for this question