title: How to parse JSON block in java
body: <p>I have some piece of JSON information.
  Example:</p>
  
  <pre><code>"Items":[{"User":{"Id":"123","name":"abcdef","email":"xy@z.com"},"User":{"Id":"456","name":"def","email":"we@z.com"}}]
  </code></pre>
  
  <p>I want to remove symbols such as '{','"' and '}' and store it in the ArrayList such that each element in the JSON has a separate position in a new ArrayList.
  The output i am expecting looks somewhat like this:</p>
  
  <pre><code>ArrayList[0][0]:Id
  ArrayList[0][1]:123
  ArrayList[1][0]:name
  ArrayList[1][1]:abcdef
  etc.,
  </code></pre>
  
  <p>Sample code:</p>
  
  <pre><code>public String[] ParseGetJSON (String str){
      String text = str;
      try{
          JSONParser jsonParser = new JSONParser();
          JSONObject jsonObj = (JSONObject) jsonParser.parse(text);
          JSONArray item = (JSONArray) jsonObj.get("Items");
          for(int i = 0;i&lt;item.size();i++){
              System.out.println("The "+i+" element of the array"+item.get(i));
          }
  </code></pre>
  
  <p>The Output:</p>
  
  <pre><code>The 0 element of the array: {"Id":"123","name":"abcdef","email":"xy@z.com"}
  </code></pre>