title: Error JSON.parse, how to convert an array jquery ajax?
body: <p>I have a AJAX call that  returns some JSON like this one:</p>
  
  <pre><code>   while($row= $stmt-&gt;fetch()){
  
                  echo json_encode(array('model' =&gt;$model ));
  
  
  
          }
  </code></pre>
  
  <p>the <strong>output</strong> is this</p>
  
  <pre><code>{"model":"MDX"}{"model":"NSX"}{"model":"RL"}{"model":"TL"}{"model":"TSX"}{"model":"RDX"}{"model":"CSX"}{"model":"ZDX"}{"model":"ILX"}{"model":"RLX"}{"model":"TLX"}
  </code></pre>
  
  <p>how can i get just the values of that array?</p>
  
  <p>the thing is that i need to convert that array to plain text like.. </p>
  
  <pre><code>MDX
  NSX
  RLd
  TL
  TSX
  RDX
  etc..
  </code></pre>
  
  <p>when i recive the callback  tried this but is throwing me out  an error </p>
  
  <pre><code>$.ajax({
  
         type:"POST",
         url:url,
         data:{category_brand:category_brand},
         datatype:"json",
         contenType: "application/json",
     }).done(function(response){
  
             var text=response;
             var obj=JSON.parse(text);
  
             console.log(obj);
  
  
     }).fail(function(jqXHR, textStatus, errorThrown){
  
       console.log(textStatus);
  
     })
  </code></pre>
  
  <p>this is tje error </p>
  
  <h2>1. > <strong>Uncaught SyntaxError:</strong> Unexpected token { in JSON at position 15 at JSON.parse () at Object. (main.js:8838) at i (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at y (jquery.min.js:4) at XMLHttpRequest.c (jquery.min.js:4)</h2>
  
  <p>can someone help me please, im no that good in <strong>json</strong> </p>