Getting the error in the autocomplete function of the jquery "this.source is not a function."

My code is :

            type: "GET",
            url: "",
            dataType: "json",
            success: function (data) {

                //$("#id").autocomplete({ source: response });
               source: data,
               select: function (event, ui) {
                   $("#search").val(ui.item.FirstName + " / " + ui.item.LastName);
                   return false;
           }).data("autocomplete")._renderItem = function (ul, item) {
               return $("<li></li>")
                   .data("item.autocomplete", item)
                   .append("<a><strong>" + item.FirstName + "</strong> / " + item.LastName + "</a>")

The data in the url is of the form
{{Data: Array[22], Id: null, Result: Object}

I want to use the FirstName and LastName of the Array which is of the form

{FirstNam:R , LAstName:e , Id:9 },{FirstNam:R , LAstName:e , Id:9},...

I tried this also

$.getJSON("", function (json) {


But this also gives the same error.

Any help ??

Source: json

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.