title: Mvc json response check for true/false
body: <p>I need to check if "success" is true or false. i get the following json response back from action: </p>
  
  <blockquote>
    <p>{"success":true}</p>
  </blockquote>
  
  <p>how can i check it if true or false. i tried this but it doesn't work. it comes back undefined</p>
  
  <pre><code>    $.post("/Admin/NewsCategory/Delete/", { id: id }, function (data) {
          alert(data.success);
          if (data.success) {
              $(this).parents('.inputBtn').remove();
          } else {
              var obj = $(this).parents('.row');
              serverError(obj, data.message);
          }
      });
  </code></pre>