获取没有key值的数据,用循环器

            JSONObject jsonObject = new JSONObject(json);
                        Iterator<?> it = jsonObject.keys();
                        while (it.hasNext()) {// 遍历JSONObject
                            key = (String) it.next().toString(); // 所有的key值
                            value = jsonObject.getString(key); // 所有的value值
                            ContentValues values = new ContentValues();
                            values.put(Const_Area.TABLE_NAME_AREA_FIELD_ID, key);
                            values.put(Const_Area.TABLE_NAME_AREA_FIELD_NAME,
                                    value);
                            db.insert(Const_Area.TABLE_NAME_AREA, null, values);

原文地址:https://www.cnblogs.com/Jingerxin/p/5663822.html