title: jQuery autocomplete not working with JSON
body: <p>I am trying to implement the jQuery autocomplete. I feel like everything is set up just fine, however It's not working.</p>
  
  <p><strong>SearchSkies method</strong></p>
  
  <pre><code>public JsonResult SearchSkies(string query)
  {
       SkiDao skiDao = new SkiDao();
       IList&lt;Ski&gt; skies = skiDao.SearchSkies(query);    
       List&lt;string&gt; brands = (from Ski s in skies select s.Brand).ToList();
       return Json(brands, JsonRequestBehavior.AllowGet);
  }
  </code></pre>
  
  <p><strong>The script in View</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $( function() {
      $( "#searchBox" ).autocomplete({
        source: function( request, response ) {
          $.ajax( {
            url: '@Url.Action("SearchSkies","Skies")',
            dataType: "json",
            data: {
              query: request.term
            },
            success: function (data) {
                response(data);
            }
          } );
        },
        minLength: 2,
      });
    });
  &lt;/script&gt;
  </code></pre>