How to read json response as name value pairs in JQuery

前端 未结 3 1181
情书的邮戳
情书的邮戳 2020-12-16 05:20

I want to read json response as name and value pairs in my JQuery code. Here is my sample JSON response that I return from my java code:

String jsonResponse          


        
3条回答
  •  盖世英雄少女心
    2020-12-16 05:45

    success: function(responseData) {
        for (var key in responseData) {
            alert(responseData[key]);
        }
    }
    

    It is important to note that the order in which the properties will be iterated is arbitrary and shouldn't be relied upon.

提交回复
热议问题