标签: javascript
[{"e":"01-25-01-006"},{"e":"01-02-05-001"}],我有这个。
[{"e":"01-25-01-006"},{"e":"01-02-05-001"}],
[ 01-25-01-006,01-02-05-001 ],我需要这种格式的数组
[ 01-25-01-006,01-02-05-001 ]
答案 0 :(得分:-1)
您可以使用map获得所需的结果:
map
let data = [{ "e": "01-25-01-006" }, { "e": "01-02-05-001" }]; console.log(data.map(entry => entry.e));