Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Javascript
map add key to object in array javascript
reflectionalist
Programming language:
Javascript
2021-06-27 16:09:46
0
Q:
map add key to object in array javascript
user86818
Code:
Javascript
2021-06-01 04:00:06
const newArr = [ {name: 'eve'}, {name: 'john'}, {name: 'jane'} ].map(v => ({...v, isActive: true}))
1
Tags
object
key
array
java
javascript
add
map
Related
Update matched key values in two JavaScript objects
set key to array javascript
js combine 2 array to object key value
js dictionary add item
javascript map ket to value
array of array key value javascript
map through keys javascript
javascript create array of objects with key
js key value array
js array to object with keys
map object array javascript
loop dictionary with key and value javascript
map object and add new property javascript
javascript add to a dictionary
es6 array to object keys
New to Communities?
Join the community