使用jquery循环并获取 json 数组的键/值对

var resultJSON = '{"FirstName":"John","LastName":"Doe","Email":"johndoe@johndoe.com","Phone":"123 dead drive"}';
var result = $.parseJSON(resultJSON);
$.each(result, function(k, v) {
    //display the key and value pair
    alert(k + ' is ' + v);
});

 

posted @ 2019-08-13 03:27  Ryan_zheng  阅读(2475)  评论(0编辑  收藏  举报