1private static int FIRST_ELEMENT = 0;
2
3public static void main(String[] args) {
4 JSONArray json = new JSONArray("[{\"Hello1\":\"1\"},{\"Hello2\":\"2\"}]");
5
6 if (json.length() > 0) {
7 System.out.println("First: " + json.getJSONObject(FIRST_ELEMENT).toString());// parse the date instead of toString()
8 }
9}
10