Created
May 16, 2018 12:58
-
-
Save benjamingr/127774037d2ce78497ff13c444382a62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const obj1 = {"1,1" : "hello"}, | |
obj2 = {"1,1" : "hi"}, | |
obj3 = [obj1, obj2].reduce((a, c) => { | |
return {...a, [k] : (a[k] || []).concat(c[k]); | |
}, {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment