Jquery - Ajax: SyntaxError: JSON.parse: unexpected character

后端 未结 3 1602
闹比i
闹比i 2021-01-27 09:36

I have the following code and output, and I cant fine any error on the json data to be decoded. Can anyone please help me in finding this error

CODE:

            


        
3条回答
  •  爱一瞬间的悲伤
    2021-01-27 10:15

    When you specify dataType : json, result is already parsed in jQuery.

    Moreover, complete function argument is returning an object representing the result not the result itself.

    That case you should use var top10Value = JSON.parse(data.responseText);

提交回复
热议问题