title: Remove jsonobject from jsonarray
body: <p><strong>I am new with android.I have simple string look like this:</strong></p>
  
  <pre><code>String json={"time":"12.00", "data":"25/01/2014","users":
  [
  
  {"id":1231,"title":"hello","url":"world"},
  {"id":7656,"title":"hello","url":"world"},
  {"id":3356,"title":"hello","url":"world"}
  
  ],"is_valid":false}
  </code></pre>
  
  <p><strong>And now I need to remove second users JSONObject:</strong></p>
  
  <pre><code>{"id":7656,"title":"hello","url":"world"}
  </code></pre>
  
  <p><strong>So I try following:</strong></p>
  
  <pre><code>JSONObject json=new JSONObject(json);
  JSONArray users=json.getJSONArray("users");
  users.remove(1);
  json.put("users",users);
  String new_json=json.toString();
  </code></pre>
  
  <p><strong>But unfortunately application forced close every time when I use users.remove(1); method please someone help me.</strong></p>
  
  <p><strong>I need following string after removing object:</strong></p>
  
  <pre><code>String new_json=
  tring json={"time":"12.00", "data":"25/01/2014","users":
  [
  
  {"id":1231,"title":"hello","url":"world"},
  {"id":3356,"title":"hello","url":"world"}
  
  ],"is_valid":false}
  </code></pre>
  
  <p><em>Thanks to all great programmers</em></p>