Get json array keys in android

前端 未结 5 1167
渐次进展
渐次进展 2020-12-15 09:16
{
    \"204\": {
        \"host\": \"https:\\/\\/abc.com\\/production-source\\/ChangSha\\/2013\\/12\\/02\\/0\\/0\\/A\\/Content\\/\",
        \"timestamp\": 138590988         


        
5条回答
  •  既然无缘
    2020-12-15 09:35

    You can also use names() as below to get the keys as JSONArray :

    JSONArray jArray = jsonObject.names();
    int len = jsonObject.length();
    for (int i=0; i

提交回复
热议问题