Parse Json data in Jquery

前端 未结 4 1595
心在旅途
心在旅途 2020-12-07 02:30

I am new to Jquery, Ajax and JSON. I am facing issue with the parsing of Json data. I have been through many questions on stackoverflow

Parsing JSON objects for HTML

4条回答
  •  执念已碎
    2020-12-07 03:29

    When you specify the dataType as JSON, jQuery will automatically parse it for you. Parsing it again as you are (multiple times, even) will cause issues. Try this:

    success: function(result) {
        console.log(result.od);
        console.log(result.od[0].percentageCompleted);
    }
    

    I'm not entirely sure what your $.each loop is trying to do as there is no tagName property in your object.

提交回复
热议问题