-5

[{"e":"01-25-01-006"},{"e":"01-02-05-001"}], I have this.

[ 01-25-01-006,01-02-05-001 ], I need this format of array

mplungjan
  • 169,008
  • 28
  • 173
  • 236

1 Answers1

-1

You can use map to get the desired outcome:

let data = [{
  "e": "01-25-01-006"
}, {
  "e": "01-02-05-001"
}];
console.log(data.map(entry => entry.e));
mplungjan
  • 169,008
  • 28
  • 173
  • 236
Tim VN
  • 1,183
  • 1
  • 7
  • 19
  • 3
    Although correct, you are likely being voted down for answering a poor question that has many duplicate answers – mplungjan May 13 '19 at 09:48
  • 3
    If the question gets downvoted and close-voted, that is a clear indicator that it should not be answered ... – Jonas Wilms May 13 '19 at 09:48
  • 2
    That's fine. Semi-new to answering questions on SO. Getting the hang of it, thanks. – Tim VN May 13 '19 at 09:51