Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

update property in object in array javascript

var result = foo.map(el => el.bar == 1 ? {...el, baz: [11,22,33]} : el);
 
PREVIOUS NEXT
Tagged: #update #property #object #array #javascript
ADD COMMENT
Topic
Name
1+7 =