title: JSON returned data it is in {d:"data"} format
body: <p>I am trying to get JQueryUI's Autocomplete code working with an ASMX web service. I am getting close, but hit yet another wall yesterday. The JSON data is being returned in {d:"data"} format (see <a href="http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx" rel="nofollow">http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx</a>). My data now looks like:</p>
  
  <pre><code>d: "[{"DOTNumber":"001061010","JobTitle":"Project Architect"},{"DOTNumber":"003061005","JobTitle":"Principal Electrical Engineer"}]"
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>$(function() {
      function log(message) {
          $("&lt;div/").text(message).prependTo("#log");
          $("#log").attr("scrollTop", 0);
      }
  });
  
  $("#dotmatch").autocomplete({
      source: function(request, response) {
          $.ajax({
              type: "POST",
              url: "/AutoSuggestJSTest/AutoSuggest.asmx/DOTFind",
              contentType: 'application/json',
              dataType: "json",
              data: JSON.stringify({ prefixText: request.term, count: 20 }),
              error: function(XMLHttpRequest, textStatus, errorThrown) {
                  alert(textStatus);
              },
              success: function(data) {
                  var safe = data;
                  response($.map(safe.d, function(item) {
                      return {
                          label: item.JobTitle + "(" + item.DOTNumber + ")",
                          value: item.DOTNumber
                      }
                  }));
              }
          });
      },
      minLength: 2,
      select: function(event, ui) {
          log(ui.item ?
                  "Selected: " + ui.item.value + " aka " + ui.item.id :
                  "Nothing selected, input was " + this.value);
          $get("DOTNumber").value = ui.item.value;
      },
  });
  </code></pre>
  
  <p>The problem lies in the success function. </p>
  
  <p><strong>What is the right syntax to get past the "d" issue?</strong></p>