var data=[{name:"a",age:12},{name:"b",age:11},{name:"c",age:13},{name:"d",age:14}]; for(var o in data){ alert(o);//返回的是key alert(data[o]);//返回的key对应的value alert("text:"+data[o].name+" value:"+dat…
1.JSON字符串转为JSON对象 var obj = eval('('+data+')');① var obj = data.praseJSON();② var obj = JSON.prase(data);③ 2.JSON对象转为JSON字符串 var obj = data.toJSONString(); var obj = JSON.stringify(data);…