Skip to content

Instantly share code, notes, and snippets.

@benjamingr
Created May 16, 2018 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjamingr/127774037d2ce78497ff13c444382a62 to your computer and use it in GitHub Desktop.
Save benjamingr/127774037d2ce78497ff13c444382a62 to your computer and use it in GitHub Desktop.
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