JS 循环遍历JSON数据
2019-04-13
前端
JavaScript
3956
1
JSON数据如:{"options":"[{/"text/":/"张三/",/"value/":/"9/"},{/"text/":/"李四/",/"value/":/"10/"},{/"text/":/"王五/",/"value/":/"13/"}]"}用js可以写成:var;data=[{name:"a",age:12},{name:"b",age:11},{name:"c",age:13},{name:"d",age:14}];;;
;;;;;;for(var;o;in;data){;;
;;;;;;;;console.log("text:"+data[o].name+&q