title: how to pas json array as parameter to other activity and display
body: <p>Im passing json array as parameter to other activity but is show all values in text when I click, see this image on monday<br/>
  <a href="http://postimg.org/image/fbjlm8y97/91beaa03/" rel="nofollow">http://postimg.org/image/fbjlm8y97/91beaa03/</a> <br/>
  is display on other activity like that <a href="http://postimg.org/image/8m0f1bjaf/987e8eb4/" rel="nofollow">http://postimg.org/image/8m0f1bjaf/987e8eb4/</a> <br/>
  every thing in string how do I show only name in TextView? now every thing how do I parse json array???</p>
  
  <p>Json :</p>
  
  <pre><code>   {
     "student": [
       {
          "id": 1,
          "name": "Monday",
          "dish": "Biryani",
          "Gender": "M",
          "age": 10,
          "birthdate": "23/05/2002"
      },
      {
          "id": 2,
          "name": "Tuesday",
          "dish": "Sandwish",
          "Gender": "M",
          "age": 12,
          "birthdate": "08/01/2000"
      },
      {
          "id": 3,
          "name": "Wednesday",
          "dish": "Chicken Tikka",
          "Gender": "F",
          "age": 14,
          "birthdate": "01/03/1998"
      },
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>            try {
                  JSONObject mainJson = new JSONObject(result);
                   jsonArray = mainJson.getJSONArray(ARRAY_NAME);
                  for (int i = 0; i &lt; jsonArray.length(); i++) {
                       objJson = jsonArray.getJSONObject(i);
  
                      Item objItem = new Item();
  
                      objItem.setId(objJson.getInt(ID));
                      objItem.setName(objJson.getString(NAME));
                      myname= objJson.getString(NAME);
                      objItem.setCity(objJson.getString(CITY));
                      objItem.setGender(objJson.getString(GENDER));
                      objItem.setAge(objJson.getInt(AGE));
                      objItem.setBirthdate(objJson.getString(BIRTH_DATE));
  
                      arrayOfList.add(objItem);
  
                  }
              } catch (JSONException e) {
                  e.printStackTrace();
              }
  
              setAdapterToListview();
  
          }
  
      }
   }
  
   @Override
   public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position,
          long id) {
  
       if(!jsonArray.isNull(position)){
             Intent intent = new Intent(SeletecDayofweek.this,TodayLunch.class);  
             intent.putExtra("name", jsonArray.optJSONObject(position).toString());
             startActivity(intent);    
       }
  
  }     
  
  
  
  
  
  
                     and get like this
  
  
                        Intent intent = getIntent();
      String stringRecd = intent.getStringExtra("name");
  </code></pre>