[
{
name: '123',
type: 'menu',
children: [{ name: '321', type: 'operation', children: null }],
},
{
name: '456',
type: 'menu',
children: [
{
name: '654',
type: 'menu',
children: [{ name: '546', type: 'operation', children: null }],
},
],
},
];这样一组数据我想通过js 的map 取出所有type = "operation"的name 例如如上数据取出来的结果是['321','546']注意:实际的数据可能无线层嵌套
添加回答
举报
0/150
提交
取消