原生js遍历json对象

遍历不规则json数组


遍历规则的json数组


遍历对象

var obj ={"name":"冯娟","password":"123456","department":"技术部","sex":"女","old":30};

for(var p in obj){
str = str+obj[p]+',';
return str;
}

你可能感兴趣的:(原生js遍历json对象)