javascript - How to parse this json data
漂亮男人
漂亮男人 2017-05-19 10:40:13
0
4
495

Why when I use ajax data.SERVERPARTObject it displays undefined

漂亮男人
漂亮男人

reply all(4)
世界只因有你

It is possible that the data format returned by the background is string type data, not a js object. Use JSON.parse to convert it into an object.

世界只因有你

data.SERVERPARTObject[0] try

習慣沉默

You can print the type of data first

console.log(typeof data);

If it is a string, then JSON.parse(data);

世界只因有你

Did you miss a sentence in the ajax you wrote? dataType: 'json',跟上面的JSON.parse(data)One meaning

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template