for(let i in obj) { console.log(i); //对象中key的值 console.log(obj[i]); //对象中key对应的value的值 } 转载于:https://www.cnblogs.com/wx2019/p/11137817.html