我有一个格式为jArray的数组:
{"users":[
{
"user_id":6,
"user_name":"Ted Vanderploeg",
"email":"test5@test.com",
"additional_info":[["HP","Chief Sales Officer","","",1]]
},
{
"user_id":59,
"user_name":"Lindsay White",
"email":"test12260@test.com",
"additional_info":[["Microsoft","Global Head","","",1]]
}
]
}
现在我需要从additional_info数组中获取值“Microsoft”。这就是我正在尝试的:
for(int i=0;i<jArray.length();i++) {
JSONObject jsonObject = new JSONObject(jArray.getString(i));
String workInfo = jsonObject.getString("additional_info");
Log.i("MyActivity", "got work obj as " + workInfo.toString());
}
现在我将workInfo改为[[“Microsoft”,“Global Head”,“”,“”,1]]。坚持下一步如何进行,以获得微软的价值。
答案 0 :(得分:1)
它看起来像JSONArray中的JSONArray
@Dependent