title: How to convert Multidimensional JSON Array into Multidimensional Java Array
body: <h2>Response of JSON</h2>
  
  <pre><code>[{
      "ETag": "c28c2a1d",
      "Id": "566668257",
      "Links": [{
          "Href": "\/v1\/companies\/566668257",
          "Rel": "self"
      }, {
          "Href": "\/v1\/companies\/566668257",
          "Rel": "parent"
      }],
      "Address": "412 S Van Buren",
      "AddressParsed": {
          "Name": "Van Buren",
          "Number": "412",
          "PreDirectional": "S"
      },
      "City": "Weiner",
      "CompanyName": "Greenway Equipment Inc",
      "FirstName": "John",
      "LastName": "Conner",
      "Location": {
          "Latitude": 35.621407,
          "Longitude": -90.910036
      },
      "Phone": "8706847720",
      "PostalCode": "72479",
      "StateProvince": "AR",
      "ParentCompany": "566668257"
  }]
  </code></pre>
  
  <p>My current code but I don't know how to get elements of <code>Links</code>:</p>
  
  <pre><code>public void parseJSON(String parse) throws JSONException {
      System.out.println("parse json");
  
      JSONArray jsonarray = new JSONArray(parse);
  
      int parselength = jsonarray.length();
  
      JSONObject arraynode ;
  
      String[] ID = new String[parselength];
      String[] Etag = new String[parselength];
      String[] City = new String[parselength];        
      String[] Address = new String[parselength];
      **//String[][] Links = new String[parselength][parselength];** 
  
      System.out.println("parse"+parselength);
  
      String strCSV = "";
  
      strCSV = "ID, Etag, Links, Address\r\n"; 
      for(int i=0; i&lt;parselength-1; i++){
  
           arraynode = jsonarray.getJSONObject(i);
  
           ID[i] = arraynode.getString("Id");
           City[i] = arraynode.getString("City");
           Etag[i] = arraynode.getString("ETag");
           Address[i] = arraynode.getString("Address");
  
           //JSONArray innerLink = new JSONArray(arraynode.getString("Links"));
  
           strCSV += Etag[i]+","+ID[i]+","+City[i]+","+Address[i]+"\r\n";    //   
      }
  }
  </code></pre>
  
  <hr>
  
  <p>I can see the multidimensional array data in the inner loop when i check it from system.out.println but when i convert it into CSV it does not copy in CSV.</p>
  
  <p>Can any on help me out in this.</p>
  
  <hr>
  
  <p>Links is a field of my JSON Array as you can see in the response of JSON Array. It is a Multidimensional array.</p>
  
  <p>When I execute my code it throws a error that Links not found.</p>
  
  <p>My Ques is that how can I Convert this JSON Array into Java Array ? As i have done for the rest of the fields.</p>