循环对象

Object.keys(obj).forEach(function(key) {

console.log(key, obj[key]);
});

原文地址:https://www.cnblogs.com/liushunli/p/11310519.html