如何在不知道名称的情况下解析JSONObject?

我有这样的json字符串:

{ "2":{ "id":"2", "first":"3", "last":"2", "ilike":"1", "created_at":"2015-06-30 16:57:39", "liketo":"2", "firstname":"FirstName", "lastname":"LastName", "birthday":null } } 

如何解析JSONObject而不知道名称“2”只是移动到下一个数组?

 String json="" // place your json format here in double Quotes with proper escapes ....... jObject = new JSONObject(json.trim()); Iterator keys = jObject.keys(); while( keys.hasNext() ) { String key = (String)keys.next(); if ( jObject.get(key) instanceof JSONObject ) { // do what ever you want with the JSONObject..... } }