title: How to read boolean value from json via JS
body: <p>I want read returned value from this method: </p>
  
  <pre><code>public ActionResult ClientIsBlocked(int? clientId)
  {
      if (!clientId.HasValue)
          return Json(null);
  
      bool isBlocked = false;
  
      try
        {
           isBlocked = this.clientsProvider.GetClientById(clientId.Value).IsBlocked;
         }
      catch
         {
             // logg
         }
      return Json(isBlocked);
   }
  </code></pre>
  
  <p>in java script in my view. It should be async/ajax. How to do that? 
  It is my js code in view. </p>
  
  <pre><code>function isBlocked(id) {
              $.ajax({
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  type: "GET",
                  url: '@Url.Action("ClientIsBlocked", "CustomerManagement", new { Area = "CustomerManagement" })',
                  data: JSON.stringify({ 'clientId': id }),
                  success: function(data) {
                      if(!data.success) {
  
                      }
                  }
              })
  </code></pre>