how to add extra value in map function in javascript code example
Example 1: map add key to object in array javascript
const newArr = [
{name: 'eve'},
{name: 'john'},
{name: 'jane'}
].map(v => ({...v, isActive: true}))
Example 2: map object and add new property javascript
Results.map(obj=> ({ ...obj, Active: 'false' }))