title: Jquery Parse Json on ajax success
body: <p>I trie to get an json in my jquery ajax successe: to worke but i dose not.......</p>
  
  <p>Thats what i tried to do:</p>
  
  <pre><code>$("#addcatform").submit(function() {
    var str = $(this).serialize();
    $.ajax({
      type: "POST",
      url: "ajax.php",
      data: str,
      success: function(data){
        var json_x = data;
        alert(json_x.firstName2);
        $('#result').html(json_x.firstName2); 
        $('#result2').html(json_x.b); 
      }
    }); 
  
    return false;
    event.preventDefault();
  }); // submit end
  </code></pre>
  
  <p>the php echos this:</p>
  
  <pre><code>$arr = array ('firstName2'=&gt;'hallo','b'=&gt;2,'c'=&gt;3,'d'=&gt;4,'e'=&gt;5);
  echo json_encode($arr);
  </code></pre>
  
  <p>Whats wrong with this? Thanks for helping!!!!</p>