日期:2014-05-16 浏览次数:20326 次
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<script type="text/javascript">
var data = [{"a":"xx","b":"xx","动态值":"xx"},{"a":"xx","b":"xx"}];
for (var i in data){
for (var j in data[i]){
alert(j);
alert(data[i][j]);
}
}
</script>
</body>
</html>
var lastchartdata=[];
var totalJsonArray=[{a:'xx',b:'xx'},{a:'xx1',b:'xx1'}];
for(var i = 0; i < totalJsonArray.length; i++){
lastchartdata.push(totalJsonArray[i]);
}
//这样,你就可以看到数据有没有装进去
for(var i=0; i<lastchartdata.length;i++){
for(var j in lastchartdata[i]){
alert(lastchartdata[i][j]);
}
}