map set key value javascript code example
Example 1: map object and add new property javascript
Results.map(obj=> ({ ...obj, Active: 'false' }))
Example 2: append to map javascript
var myMap = {};
myMap[newKey] = newValue;
// ...
// Another method
var myMap = new Map()
myMap.set("key0","value")
// ...
myMap.has("key1"); // evaluates to false, assuming key1 wasn't set