title: How to alert ajax response
body: <p>I've read dozens of related posts, but I still can't get this to work.</p>
  
  <p>I want to alert the response in jquery I get from PHP.</p>
  
  <p>PHP:</p>
  
  <pre><code>$msg=array();
  
      if(empty($whatever)){
          $msg['cenas']="Não há contas";
      }else{
          $msg['cenas']="Há contas";
      };
  
      echo json_encode($msg);
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$.ajax({
      url: 'myscript.php',
      dataType: 'json',
      success: function(response){
         alert(response.cenas);
      }
  });
  </code></pre>
  
  <p>PHP is echoing </p>
  
  <blockquote>
    <p>{cenas: "Há contas}"
    But I can't get it to alert in JS.</p>
  </blockquote>