I need to return back from array to new Map data.
I have a array:
let test = [
['test' , true],
['test1' , true],
['test2' , true]
];
I need to set this to new Map like a :
{ 'test' => true }
{ 'test1' => true }
{ 'test2' => true }
What i am try ?
newMapData = [...new Map(test)];
But this is no work correctly.
I am using : https://www.w3schools.com/js/js_object_maps.asp
newMapData = new Map(test)?Mapconstructor accepts.newMapData = new Map(test)works perfectly...