title: Extract a part of the JSON object in JAVA
body: <p>This is the sample of a JSON object. I want to extract the part of it and display those values in a jTable (SWING) in JAVA. Keys as table column names and values as row data respectively.</p>
  
  <pre><code>[
     {
        "_id":{
           "date":"xxxxxxxx",
           "time":"xxxxxxx",
           "inc":"xxxx"
        },
        "DOCUMENTS":[
           {
              "EName":"John",
              "eAge":"25",
              "eAddress":"UK"
           },
  
           {
              "EName":"Alex",
              "eAge":"24",
              "eAddress":"Australia"
           }
        ]
     }
  ]
  </code></pre>
  
  <p>I want to extract this part. </p>
  
  <pre><code>      [
           {
              "EName":"John",
              "eAge":"25",
              "eAddress":"UK"
           },
           {
              "EName":"Alex",
              "eAge":"24",
              "eAddress":"Australia"
           }
        ]
  </code></pre>
  
  <p>I used this way to get the answer. Here jsonstring is the string that contains above data.</p>
  
  <pre><code>        String[] splits = jsonString.split("DOCUMENTS\":");
          String[] splits2 = splits[1].split("\\}]", 2);
          System.out.println("spilted  :"+splits2[0]);
  </code></pre>
  
  <p>but it is giving me the answer as</p>
  
  <pre><code>[{"EName":"John","eAge":"25","eAddress":"UK"}, 
   {"EName":"Alex","eAge":"24","eAddress":"Australia"
  </code></pre>
  
  <p>it removed the closed square bracket.</p>
  
  <p>How can I get the correct answer? Your help is much appreciated.</p>