var value={"name":"ABC","age":20}; var result = []; //forEach angular.forEach(value , function(value,key){ console.log(value); console.log(key); this.push(value + key) //this代表结果数组 } , result); console.log(result);
原文:http://www.cnblogs.com/lovemomo/p/6102742.html