Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

map to array javascript

let map = new Map().set('a', 1).set('b', 2),
    array = Array.from(map, ([name, value]) => ({ name, value }));

console.log(array);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #map #array #javascript
ADD COMMENT
Topic
Name
5+8 =