title: How to set this two json array in two spinner in android?
body: <p>How can I set this type of json response in spinner. In response I have two json array how can i set these two array in different two spinner. like fist spinner have first array value like st1,st2 and second spinner have value with st4,st5,st6. </p>
  
  <p>My Api Response is:</p>
  
  <pre><code>   [
    {
      "status": "success",
      "Data1": [
          "st1",
          "st2"
       ],
      "Data2": [
          "st3",
          "st4",
          "st4"
         ]
     }
  ] 
  </code></pre>
  
  <p>And I try </p>
  
  <pre><code>   private void getdata(){
  
      if (isNetworkAvailable()) {
  
          AsyncHttpClient client = new AsyncHttpClient();
          client.setTimeout(800000);
          final RequestParams params = new RequestParams();
  
          client.post("here is my api url", new TextHttpResponseHandler() {
  
              @Override
              public void onFailure(int statusCode, 
       cz.msebera.android.httpclient.Header[] headers, String responseString, 
     Throwable throwable) {
                  Toast.makeText(MainActivity.this, responseString, 
     Toast.LENGTH_SHORT).show();
              }
  
              @Override
              public void onSuccess(int statusCode, 
      cz.msebera.android.httpclient.Header[] headers, String responseString) {
                  if (responseString != null) {
  
                      try {
  
                          JSONArray jaa = new JSONArray(responseString);
                          JSONObject json = jaa.getJSONObject(0);
  
  
                          String status = json.getString("status");
  
                          if (status.equals("success")) {
  
                              JSONArray jsonArray = 
            json.getJSONArray("Data1");
                              JSONArray jsonArray12 = 
            json.getJSONArray("Data2");
  
  
                              for (int i = 0; i &lt; jsonArray.length(); i++) {
  
                                  Data school = new Data();
                                  school.setCurrency(jsonArray.getString(i));
  
            school.setCrpto_currency(jsonArray12.getString(i));
                                  btclist.add(school);
                                  schoolNames.add(jsonArray.getString(i));
                                  schoolNames12.add(jsonArray12.getString(i));
                              }
                          }
                      } catch (Exception e) {
                          e.printStackTrace();
                      }
                      spinner1.setAdapter(new ArrayAdapter&lt;String&gt; 
     (MainActivity.this, android.R.layout.simple_spinner_dropdown_item, 
      schoolNames));
                      spinner2.setAdapter(new ArrayAdapter&lt;String&gt; 
       (MainActivity.this, android.R.layout.simple_spinner_dropdown_item, 
       schoolNames12));
                  } else {
                      Toast.makeText(MainActivity.this, "data is not 
        available!", Toast.LENGTH_SHORT).show();
                  }
              }
          });
  
      }else {
          Toast.makeText(MainActivity.this, "No Internet connection", 
      Toast.LENGTH_SHORT).show();
      }
  }
  </code></pre>