title: how do I get the corresponding JSON value in my JSON object?
body: <p>Getting the <code>name</code> value in my <code>Toast</code> in <code>onItemClick</code> of my <code>ListView</code> I can do, but how do I get the <code>code</code> value?</p>
  
  <p>I have a JSON array that looks like this : </p>
  
  <pre><code> [
      {
        "code": "123",
        "name": "Jim"
      },
      {
        "code": "456",
        "name": "Sally"
      },
      {
        "code": "789",
        "name": "Bob"
      },
      {
        "code": "012",
        "name": "Jill"
      },
    etc...
    ]
  </code></pre>
  
  <p>I get the <code>name</code> value in my <code>ListView</code> like this : </p>
  
  <pre><code>public void onStart(){
          super.onStart();
  
          //  Create json array request
          JsonArrayRequest jsonArrayRequest=new JsonArrayRequest(Request.Method.POST,
                  "http://www.nameofsite.com/nameoffile.php", (JSONArray)null, new Response.Listener&lt;JSONArray&gt;(){
              public void onResponse(JSONArray jsonArray){
                  // Successfully download json
                  // So parse it and populate the listview
                  for(int i=0;i&lt;jsonArray.length();i++){
                      try {
                          JSONObject jsonObject=jsonArray.getJSONObject(i);
                          items.add(jsonObject.getString("name"));
                      } catch (JSONException e) {
                          e.printStackTrace();
                      }
                  }
                  adapter.notifyDataSetChanged();
              }
          }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError volleyError) {
                  Log.e("Error", "Unable to parse json array");
              }
          });
          // Create request queue
          RequestQueue requestQueue= Volley.newRequestQueue(this);
          // add json array request to the request queue
          requestQueue.add(jsonArrayRequest);
      }
  </code></pre>
  
  <p>And <code>Toast</code> of <code>name</code> in <code>onItemClick</code> like this :</p>
  
  <pre><code>listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
      @Override
      public void onItemClick(AdapterView&lt;?&gt; adapterView, View view, int i, long l) {
          TextView myTextView = (TextView) view.findViewById(R.id.txt);
          String text = myTextView.getText().toString();
          Toast.makeText(getApplicationContext(),text, Toast.LENGTH_LONG).show();
      }
  });
  </code></pre>
  
  <p>But I want the <code>code</code> value in the <code>toast</code>, not the <code>name</code>. How can I do it?</p>