Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
127
rated 0 times [  133] [ 6]  / answers: 1 / hits: 17094  / 13 Years ago, sat, november 26, 2011, 12:00:00

pretty basic question I think, but I couldn't find info on that.



Through d3 I parse a csv and each object look like this



name: whatever
number: 52


How can I access the array of all the properties number as an array without creating a new array and pushing each element?


More From » arrays

 Answers
19

ES6 version:



const numbers = objects.map( o => o.number );


Enjoy.


[#88892] Thursday, November 24, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
yaquelina

Total Points: 517
Total Questions: 101
Total Answers: 96

Location: Egypt
Member since Tue, Jul 6, 2021
3 Years ago
yaquelina questions
;