Something like [this question](https://stackoverflow.com/questions/6304460/android-how-to-get-data-from-json-having-array-within-array) 

How to save in variables?

But with this json code:

```
{
    "restarutant": [
        {
            "name": "Hotel Raja",
            "photo": "http:\/\/i.imgur.com\/Mzt4u.jpg",
            "address": "93, 2ndc ross, GDP etx.",
            "area": "Vylaikaval",
            "city": "Bangalore",
            "rating": "4",
            "cuisines": {
                "first": "Chinese",
                "second": "Korean"
            }
        },
        {
            "name": "Hotel Raja2",
            "photo": "http:\/\/i.imgur2.com\/Mzt4u.jpg",
            "address": "93, 2ndc ross, GDP etx. number2",
            "area": "Vylaikaval2",
            "city": "Bangalore2",
            "rating": "4",
            "cuisines": {
                "first": "Chinese2",
                "second": "Korean2"
            }
        }
    ]
}

```

Code:

```
JSONObject json = new JSONObject(thepreviousjson);
JSONArray jArray = json.getJSONArray("restaurant");

String name[] = new String[jArray.length()];
String photo[] = new String[jArray.length()];
String address[] = new String[jArray.length()];
String area[] = new String[jArray.length()];
String city[] = new String[jArray.length()];
String rating[] = new String[jArray.length()];

String cuisines[] = new String[jArray.length()];
String first[] = new String[jArray.length()];
String second[] = new String[jArray.length()];

for(int i=0; i<jArray.length(); i++){
    JSONObject json_data = jArray.getJSONObject(i);

    name[i] = json_data.getString("name");
    photo[i] = json_data.getString("photo");
    address[i] = json_data.getString("address");
    area[i] = json_data.getString("area");
    city[i] = json_data.getString("city");
    rating[i] = json_data.getString("rating");
}

```

The point is to have stored: 
`name[0] = "Hotel Raja"...
name[1] = "Hotel Raja2"
first[0] = Chinese, second[0] = Korean, first[1] = Chinese2, second[1] = Korean2`

I have tried several combination, but nothing happens, what do I need to modify in my code? thanks