title: Looping through json object without child name
body: <p>I want to retrieve the values of all element in this json format document.</p>
  
  <pre><code>[
              {
                  "id": "c0001xgp",
                  "title": 8.8,
                  "content": 142.369,
                  "vignette": "us",
                  "image": "2011-03-11 04:46:23",
                  "type": 24.4,
                  "pubdate": 38.322
            },
              {
                  "id": "c0001xgp",
                  "title": 8.8,
                  "content": 142.369,
                  "vignette": "us",
                  "image": "2011-03-11 04:46:23",
                  "type": 24.4,
                  "pubdate": 38.322
            },  {
                  "id": "c0001xgp",
                  "title": 8.8,
                  "content": 142.369,
                  "vignette": "us",
                  "image": "2011-03-11 04:46:23",
                  "type": 24.4,
                  "pubdate": 38.322
            },  {
                  "id": "c0001xgp",
                  "title": 8.8,
                  "content": 142.369,
                  "vignette": "us",
                  "image": "2011-03-11 04:46:23",
                  "type": 24.4,
                  "pubdate": 38.322
            }
  </code></pre>
  
  <p>]</p>
  
  <p>how can i achieve this. i'm learning json and android. when there is a parent in the json object i can deal with but now i am have trouble to solve this problem.</p>
  
  <p>The main class</p>
  
  <pre><code>// JSON Node names
  private static final String TAG_ARRAY= "";
  
  private static final String TAG_ID = "id";
  
  private static final String TAG_TITLE = "title";
  
  private static final String TAG_CONTENT = "content";
  
  private static final String TAG_VIGNETTE = "vignette";
  
  private static final String TAG_IMAGE = "image";
  
  private static final String TAG_TYPE = "type";
  
  private static final String TAG_PUBDATE = "pubdate";
  
  
  // contacts JSONArray
  
  JSONArray myArray = null;
  
  @Override
  
  public void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.actus);
  
      // Hashmap for ListView
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; contactList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
      // Creating JSON Parser instance
  
      JSONParser jParser = new JSONParser();
  
      // getting JSON string from URL
       JSONArray jArray = jParser.getJSONFromUrl(url);
  
  
          // looping through All element
          for(int i = 0; i &lt; jArray.length(); i++){
  
  
              JSONObject oneObject = null;
              try{
  
              oneObject = jArray.getJSONObject(i);
  
              // Storing each json item in variable
              String id;
  
              String title;
  
                  title = oneObject.getString(TAG_TITLE);
  
  
              String content = oneObject.getString(TAG_CONTENT);
  
              String vignette = oneObject.getString(TAG_VIGNETTE);
  
              String image = oneObject.getString(TAG_IMAGE);
  
              String type = oneObject.getString(TAG_TYPE);
  
              String pubdate = oneObject.getString(TAG_PUBDATE);
  
  
              // creating new HashMap
              HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  
              // adding each child node to HashMap key =&gt; value
  
              map.put(TAG_TITLE, title);
  
              map.put(TAG_CONTENT, content);
  
              map.put(TAG_VIGNETTE, vignette);
  
              map.put(TAG_TYPE, type);
  
              map.put(TAG_PUBDATE, pubdate);
  
  
  
              // adding HashList to ArrayList
  
              contactList.add(map);
  
  
              }catch (JSONException e) {
  
                  // TODO Auto-generated catch 
  </code></pre>
  
  <p>block
                      e.printStackTrace();
                  }</p>
  
  <pre><code>        }
  
  
  
      /**
       * Updating parsed JSON data into ListView
       */
      ListAdapter adapter = new SimpleAdapter(this, contactList,
              R.layout.list_item,
              new String[] { TAG_TITLE, TAG_CONTENT, TAG_VIGNETTE }, new int[] {
                      R.id.name, R.id.email, R.id.mobile });
  
      setListAdapter(adapter);
  
      // selecting single ListView item
      ListView lv = getListView();
  
      // Launching new screen on Selecting Single ListItem
  
      lv.setOnItemClickListener(new OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                  int position, long id) {
              // getting values from selected ListItem
              String name = ((TextView) view.findViewById(R.id.name)).getText().toString();
  
              String cost = ((TextView) view.findViewById(R.id.email)).getText().toString();
  
              String description = ((TextView) view.findViewById(R.id.mobile)).getText().toString();
  
              // Starting new intent
              Intent in = new Intent(getApplicationContext(), SingleMenuItemActivity.class);
              in.putExtra(TAG_VIGNETTE, name);
  
              in.putExtra(TAG_CONTENT, cost);
  
              in.putExtra(TAG_VIGNETTE, description);
  
              startActivity(in);
  
          }
      });
  
  
  }
  </code></pre>