1、將Json字符串轉(zhuǎn)換成JSON對(duì)象
view sourceprint?1 var t='{"firstName": "cyra", "lastName": "richardson"}';
2 var obj = eval('(' + t + ')');
2、遍歷讀取鍵值對(duì)
view sourceprint?1 for(var str in obj){
2 alert(str+'='+obj[str]);
3 }
更多信息請(qǐng)查看IT技術(shù)專欄