Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
array objects to a single object
//JavaScript-C24.2.0 (SpiderMonkey) var arr = [{ key:"11", value:"1100" }, { key:"22", value:"2200" }]; var result = arr.reduce(function(obj,item){ obj[item.key] = item.value; return obj; }, {});
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
2020 Marec
Константа круга
123
Too much Recursion
Iterator()-function
js
First Non Repeating Character
9
More testing with JS
game
Please log in to post a comment.