Jquery Autocomplete JSON string parsing error

前端 未结 2 1913
孤街浪徒
孤街浪徒 2021-01-16 07:08

I want to use Jquery autocomplete in my web application but encounter issues. I am developing my application in ASP.NET and JQuery.

Here\'s the part of the Autocopm

2条回答
  •  日久生厌
    2021-01-16 07:19

    You're right -- your JSON is an array which contains a single object. You're expecting just that object.

    Try modifying your code like so:

    success: function (data) {
      data = data[0]; 
    

提交回复
热议问题