title: Return Json data to Ajax call
body: <p>I have a method in MVC that I post to it and I need to return some data back to process. 
  This is my MVC method that I post to and return Value is a json data.</p>
  
  <pre><code>[HttpPost]
  public JsonResult GetCalculateAmortizationSchedule()
  {
      var data = ...
      var httpClient = new HttpClient();
      var response = httpClient.PostAsJsonAsync("http://localhost:62815/v1/APR/CalculateAmortizationSchedule", data).Result;
      var returnValue = response.Content.ReadAsAsync&lt;Dictionary&lt;int, AmItem&gt;&gt;().Result;
      return Json(returnValue);
  }
  </code></pre>
  
  <p>This is my AJax call that successfully run the MVC method. </p>
  
  <pre><code>$('#MyForm').submit(function (e) {
      debugger;
      $.ajax({
          url: "/home/GetCalculateAmortizationSchedule",
          type: "POST",
          dataType: "json",
          contentType: "application/json; charset=utf-8",                
          success: function (result) {
              alert("success");
          },
          error: function (result) {
              alert("error");
          }
      });
      e.preventDefault();
  });
  </code></pre>
  
  <p>My problem is how to catch the return value from method? when I run this after   return Json(returnValue) the value is not returning to Ajax method and instead of seeing the Success Alert I see the error Alert. </p>