Answers for "map item to array"

0

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);
Posted by: Guest on July-19-2021

Browse Popular Code Answers by Language