title: is there a way to send two json objects in AJAX response?
body: <p>i have created a AJAX request , where i have sent data to process.php page , this page will process this data and then will create a JSON object that will be sent as AJAX response. Now i need to create one second JSON object in order to sent as AJAX response, that is  possible? , if is possible , how i can to manage this two objects separatelly?</p>
  
  <p>The code that i have is:</p>
  
  <pre><code>$(document).on('change', '#seleccio_test,#seleccio_test2', function(){
  
      var capaTEST;
      var pagina="show_test_prova.php";
       $.ajax({
                   async:false,    
                   cache:false,   
                   dataType:"json",        
                   type: "POST",   
                   url: pagina,
                   data: "dades_test="+obtenirTest(),
                   success:  function(obj1){ 
  
                      //alert(JSON.stringify(resultat));
                          var idtest=0;
                          $.each(obj1, function(key, value) {//object 1 that i retrieve from process.php
  
                              if(key !=0){
  
                                  for (i = 0; i &lt; value.length; i++) { 
                                      alert("Key:" + key + " /value: " + value+" /index: "+idtest);
  
                                      var llistat_test="";
                                      llistat_test +="&lt;div id='"+value+"'&gt;";
                                      llistat_test+="&lt;ol&gt;&lt;li&gt;&lt;label for='test' id='etiquetalabel'&gt;"+value[i]+"&lt;/label&gt;";
                                      llistat_test+="&lt;input type='checkbox' id='$capaCONTENT"+idtest+"name='test[]' value='"+value[i]+"'";
                                      llista_test+="onclick=' onclick='show_content($seleccio_content,$id_capa,$pagina,$idtest,$valor_org,$valor_eval,$valor_test)';&gt;";
                                      llistat_test+="&lt;/div&gt; &lt;ol&gt; &lt;div style='display: none;'&gt; &lt;/div&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt; ";
  
                                      var contenido= $("#"+key);
                                      var elementBuscado=$("#"+value);
  
                                       //if(!contenido.find(elementBuscado).length){
                                          //no exist
                                          contenido.append(llistat_test);
  
                                          //}
                                      idtest++;
                                          }       
                                      }
  
                                  });
  
                              },
          beforeSend:function(){},
          error:function(jqXHR, textStatus, errorThrown ){}
      })
  
  })  
  </code></pre>
  
  <p>Regards.</p>