转换前是这样的:var articles = [{ title: 'hello', content: 'hello world', created_at:'2017-08-30 13:45:15'},{ title: 'foo', content: 'foo bar', created_at:'2017-08-30 13:45:15'}];我想把它转成这样:var articles2 = [ [ 'hello', 'hello world', '2017-08-30 13:45:15' ], [ 'foo', 'foo bar','2017-08-30 13:46:06' ]];用js应该怎么做呢?
1 回答
白板的微信
TA贡献1883条经验 获得超3个赞
var articles = [{
title: 'hello',
content: 'hello world',
created_at:'2017-08-30 13:45:15'
},{
title: 'foo',
content: 'foo bar',
created_at:'2017-08-30 13:45:15'
}]
var result = articles.map(item => {
return Object.values(item)
})
添加回答
举报
0/150
提交
取消