title: Handle json jquery ajax response 2 arrays
body: <p>I am not that good at ajax, javascript and so on.</p>
  
  <p>I echoed from my PHP file 2 JSON arrays:</p>
  
  <pre><code>{key":"R\/EPspiig3jNffjjE6YWTsB+rsdlCjqnm1LExC\/vJXE=","nonce":"1aab51c5d8b23b7c110ae3f2a2d440bf0797750c85bd1602e8d57c357f34dab9"}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>{"error":1,"message":"\u05d4\u05d0\u05d9\u05de\u05d9\u05d9\u05dc \u05e9\u05d4\u05d6\u05e0\u05ea \u05e9\u05d2\u05d5\u05d9 \u05d0\u05d5 \u05dc\u05d0 \u05ea\u05e7\u05d9\u05df \u05e0\u05e1\u05d4 \u05e9\u05d5\u05d1 ,\u05d0\u05e0\u05d0 \u05d4\u05db\u05e0\u05e1 \u05e1\u05d9\u05e1\u05de\u05d0"}
  </code></pre>
  
  <p>in my ajax i have this : </p>
  
  <p>success: function(data)
        {  </p>
  
  <pre><code>           obj = JSON &amp;&amp; JSON.parse(data) || $.parseJSON(data);
  
             if(data[0].login == true) 
              {  
                  window.location = "index.php";
  
              }
              else
                {
               $("#siimage").trigger("click");
               $("form input:submit").effect("shake", {times:2}, 100);
               $("#errorMessage").html(data[0].message); 
               $("#nonce").val(data[1].nonce);
               $("#key").val(data[1].key);
                }
  
  
  
  
           if(data.cblocked == true)
           {
           $("#email").prop('disabled', true);
           $("#password").prop('disabled', true);
           $('input[type="submit"]').attr('disabled','disabled');
           document.getElementById("Submit").value = 'נעול';
  
           }
            if(data.csrf == true)
           {
           $("#email").prop('disabled', true);
           $("#password").prop('disabled', true);
           $('input[type="submit"]').attr('disabled','disabled');
           document.getElementById("Submit").value = 'נעול';
  
           }
  </code></pre>
  
  <p>this the problem : </p>
  
  <pre><code>$("#nonce").val(data[1].nonce);
               $("#key").val(data[1].key);
  </code></pre>
  
  <p>how i using that ,because i have 2 arrays anyway i using parse and handle 2 arrays this way ? like data[0] = array 1 and data[1] = array 2 ?</p>