How to fetch Data From JSON

前端 未结 6 1117
予麋鹿
予麋鹿 2021-01-27 15:01

I have following data from JSON

{
        \"MenuName\": \"starter dish\",
        \"SubMenu\": [
            \"pizza dish1\",
            \"pizza dish2\"
                


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-27 15:21

    try this

              for (int i = 0; i < jsonArray.length(); i++) {
                 jsonArray.getJSONObject(i).getInt("SubMenu");
                 }
    

提交回复
热议问题