{ "response": { "Category": [ "Restaurant", "Salon", "Spa", "Dry Cleaners", "Car Spa", "Hospitals" ] } }
            Asked
            
        
        
            Active
            
        
            Viewed 73 times
        
    2 Answers
0
            
            
        You can do like this-
     try {
            String json = <Your Json String>;
            JSONObject response = new JSONObject(json);
            JSONArray category = response.getJSONArray("Category");
            for (int i = 0; i < category.length(); i++) {
                Log.d("categories are", category.getString(i));
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
 
    
    
        Sanjeet A
        
- 5,171
- 3
- 23
- 40
 
    