遍历一个对象数组,取出每个对象的属性组成字符串

1,082 阅读1分钟

比如我们希望对data对象数组遍历得到index属性用,连接的字符串: let str = data.map(v => v.data.index).join(',');