title: How to return anonymous type as json in Asp.Net MVC
body: <p>This is my function.</p>
  
  <pre><code>    function reqQuoteFile(_url) {
          $.ajax({
              type: "GET",
              url: _url,
              dataType: "json",
              success: function (data) {
                  if(data["itemsNotSupportedWarning"] != '')
                  {
                      alert(data["itemsNotSupportedWarning"]);
                      //more code...
                  }
              }
          });
      }
  </code></pre>
  
  <p>It calling this action</p>
  
  <pre><code>public ActionResult ExportQuote(string projectNumber)
  {
   //more code here...
  
   return Json(new 
                 { quoteFileName = _quoteFileName, 
                   itemsNotSupportedWarning = _itemsNotSupportedWarning 
              });
  }
  </code></pre>
  
  <p><strong>_quoteFileName</strong> and <strong>_itemsNotSupportedWarning</strong> are strings. </p>
  
  <p>When I run the code in debug mode, the ajax is calling the action. However, after the action executes, the alert popup doesn't show up.</p>
  
  <p>Thanks for helping.</p>