title: How do I parse a JSON array in Java?
body: <p>I have the following JSON text and would like to get the values "detest" and "dislike".</p>
  
  <pre><code>{
    "noun": {
      "syn": [
        "hatred",
        "emotion"
      ],
      "ant": [
        "love"
      ]
    },
    "verb": {
      "syn": [
        "detest",
        "dislike"
      ],
      "ant": [
        "love"
      ]
    }
  }
  </code></pre>
  
  <p>I've tried parsing it using the org.json library with the following:</p>
  
  <pre><code>JSONArray obj = new JSONObject(String);
  JSONArray arr = obj.getJSONArray("syn");
  </code></pre>
  
  <p>But I can't seem to access the array this way.
  Any help is greatly appreciated.</p>