SOURCE

var data = []
for (var i = 0; i< 6; i++) {
  var data1 = new Date()
  data.push({created: data1.valueOf(), name: 'liushui'})
}
var dataNew = []
dataNew = data.map(function(k) {
  var str = new Date(k.created)
  Y = str.getFullYear() + '-';
  M = (str.getMonth()+1 < 10 ? '0'+(str.getMonth()+1) : str.getMonth()+1) + '-';
  D = str.getDate();
  return {
    created: Y + M + D,
    name: k.name
  }
})
console.log(dataNew)
console 命令行工具 X clear

                    
>
console