title: How to add a String Array in a JSON object?
body: <p>I am trying to create this JSON object on android. I am stuck on how to add a string array in the object.</p>
  
  <pre><code>A = {
      "class" : "4" ,
      "name" : ["john", "mat", "jason", "matthew"]
      }
  </code></pre>
  
  <p>This is the code that I have written : </p>
  
  <pre><code>import org.json.JSONObject;
  
  JSONObject school = new JSONObject();
  
  school.put("class","4");
  school.put("name", ["john", "mat", "jason", "matthew"] );
  </code></pre>
  
  <p>But the last line gives an error. Any way past this?</p>