title: how to convert json/array from ajax responseText in to javascript array?
body: <p>I have used ajax in the code which works perfectly and give me json or array which ever I want as an output.
  the code I have used is,</p>
  
  <pre><code>xmlhttp=new XMLHttpRequest();
  xmlhttp.open("GET","http://map_ajax_control.php",false);
  xmlhttp.send();
  
  var test = xmlhttp.responseText;
  alert(test);
  </code></pre>
  
  <p>This test variable gives me json/array.</p>
  
  <p>I want to get the data which I received in the test variable in the JavaScript array.</p>
  
  <p>The question is, how can I decode json data in javascript array?
  I have used the code as,   </p>
  
  <pre><code>var output = new Array();  
  output = json_decode(xmlhttp.responseText);
  </code></pre>
  
  <p>but this code is not giving me any output.<br>
  How can I do this two things?</p>