DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
JS map change values
const updatedData = originalData.map(x => (x.id === id ? { ...x, updatedField: 1 } : x));
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#JS
#map
#change
#values
ADD COMMENT
Topic
COMMENT
Name
5+6 =
Submit