I got a JSONArray of JSONObjects.
How can i sort the JSONArray alphabetic based on a string field in the JSONObject?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t think you can do that with JSONArray and JSONObject classes. You’d have to deserialize to other Java classes and use those functions to do your sorting.
The best way to deserialize might be to use the Google GSON library: https://sites.google.com/site/gson/gson-user-guide#TOC-Collections-Examples