title: jQuery ignores response
body: <p>Hi anyone sees why my alert won't work?</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
      function SubmitForm(method) {
          var login = document.form.login.value;
          var password = document.form.password.value;
          $.post(&quot;backend.php&quot;, { 
              login: login, 
              password: password, 
              method: method},
              function(data){
              alert(data.message); 
              console.log(data.refresh); 
          }, &quot;json&quot;);
      }
  &lt;/script&gt;
  </code></pre>
  <p>Response from backend.php is</p>
  <pre><code>backend{&quot;message&quot;:&quot;Log in credentials are not correct&quot;,&quot;refresh&quot;:&quot;false&quot;}
  </code></pre>