title: Return two JSON objects to AJAX
body: <p>I make an AJAX request to a PHP file as follows:</p>
  
  <pre class="lang-js prettyprint-override"><code>function verifica() {
    var meuid = $('.meuid').attr('id');
    var datas = "user=" + meuid;
    $.ajax({
      type: "GET",
      url: 'sys/stream2.php',
      data: datas
    }).done(function(data) {
      //alert(data);
      $('#nome').html(data);
    });
  }
  </code></pre>
  
  <p>In my PHP file, I output JSON data from a loop:</p>
  
  <pre class="lang-php prettyprint-override"><code>foreach ($gUsuarios as $usuarios) {
    $agora = $usuarios['AGORA'];   
    if ($agora &gt;= $usuarios['cUsu_Limite']) {            
      echo json_encode(array('usuarioon' =&gt; $usuarios['cUsu_ID'], 'status' =&gt; 'fa fa-circle-o text-red'));            
    } else {    
      echo json_encode(array('usuarioon' =&gt; $usuarios['cUsu_ID'], 'status' =&gt; 'fa fa-circle-o text-green'));
    }
  }
  </code></pre>
  
  <p>The output is two JSON objects:</p>
  
  <pre class="lang-json prettyprint-override"><code>{"usuarioon":"1","status":"fa fa-circle-o text-red"}
  {"usuarioon":"3","status":"fa fa-circle-o text-red"}      
  </code></pre>
  
  <p>How can I parse the two JSON objects in my AJAX success handler? I've tried with <code>parseJSON</code>, but it did not work. I think it's because I'm returning an array within a <code>foreach</code>.</p>