title: Need to get id value from json array in java
body: <pre><code>JSONObject test = get_details();
  </code></pre>
  
  <p>Here is my input:</p>
  
  <pre><code>   test = {"users": [{"id": 1, "address": "CA"}]}
     System.out.println("test : " + test);
  
     users = test.get("users")
     System.out.println("users : " + users);
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>test : {"users": [{"id": 1, "address": "CA"}]}
  users : [{"id": 1, "address": "CA"}]
  </code></pre>
  
  <p>I want to get the <code>id</code> value from users as below:</p>
  
  <pre><code>1
  </code></pre>
  
  <p>How can I get it? </p>