title: How to remove the JSON array element in Android
body: <pre><code> { "Employee" :  
          [  
           {"id":"101","name":"Sonoo Jaiswal","salary":"50000"},  
           {"id":"102","name":"Vimal Jaiswal","salary":"60000"}  
          ]   
      }  
  
  for (int i =0;i&lt; json_array.length(); i++) {
       json_array.remove(i);
    }
  </code></pre>
  
  <p>I  have one sample JSONArray data. I want to remove the whole json array with certain condition.
  But <code>json_array.remove(position)</code> method is not working. Is there any other way to remove the whole JSON array or element in Android?</p>