title: How to convert json object to string array
body: <p>I have got a null String variable and String array is stock string variable like this:</p>
  
  <pre><code>String value1;
  String value2;
  
  String[] arr = {value1,value2};
  </code></pre>
  
  <p>And in <strong>JSON</strong> object I try coding like this:</p>
  
  <pre><code>for(int i=0;i &lt; jLocation.length();i++){
      value1 = jLocation.getJSONObject(i).getString("name");
      value2 = jLocation.getJSONObject(i).getString("location");
  } 
  </code></pre>
  
  <p>But not return value into variable. How to resolve problem?</p>