let obj = {}
1、for in
for (key in data){
console.log("key:" + key, "value:" + data[key]);
}
2、.each()
$.each(obj,(key,value)=>{
console.log("key:" + key, "value:" + value)
})
对象遍历
原文:https://www.cnblogs.com/zhipengw/p/11895639.html