I am doing an MVC application where i need to pass json object from controller to view.
var dictionary = listLocation.ToDictionary(x => x.label, x => x
$.ajax({ dataType: "json", type: "POST", url: "/Home/AutocompleteID", data: data, success: function (data) { $('#search').html(''); $('#search').append(data[0].Scheme_Code); $('#search').append(data[0].Scheme_Name); } });