我需要将我的对象转换为对象数组我的对象如下:
superman = {
name: 'Superman',
'real name': 'Clark Kent',
height: 75,
weight: 235,
hero: true,
villain: false,
allies: {superHero: 'Batman',
superPower: 'He is rich',
sidekick: 'robin'}
}
&我需要它转换成:
[
{name: 'Superman'},
{realName: 'Clark Kent'},
{height: 75},
{weight: 235},
{hero: true},
{villain: false},
{allies: [superHero: 'Batman',
superPower: 'He is rich',
sidekick: 'robin']}
]
扬帆大鱼
FFIVE
相关分类