有没有一种方法可以通过使用索引值而不是密钥来遍历JSON结果? 我想查看json数据结果并获取发送的键和值。通过JSONResult中的数据循环
例如
$.get('/Home/GetTypes', function (data)
{
$.each(function(index) {
//Just as an example I know this will not work. Thanks
'<a class="p-button" href="/Wizard/Create/" + data[index][value] + " '">' + data[index][key] + '</a>'
}
});
什么呢,你回来的样子JSON字符串? –