我有像下面通过JSON数据迭代?
{
"computer": [
{
"product_id": "6",
},
{
"product_id": "10",
}
],
"Stationery": [
{
"product_id": "11",
}
]
}
我想通过jQuery中/ JavaScript的这些类型的JSON数据要迭代的JSON数据。我怎样才能做到这一点 ??
谢谢
需要澄清。数据来自哪里?它是分配给一个变量还是来自服务器? – bcoughlan
可能的重复http://stackoverflow.com/questions/6998013/reading-json-data-in-javascript?rq=1 – Dan
我想你会想'JSON.stringify'。但是等等... jQuery应该已经为你做了! –