Skip to content

Instantly share code, notes, and snippets.

@plukevdh
Created September 21, 2016 21:49
Show Gist options
  • Save plukevdh/5d1098f83ac96453f86b201a5c2b9042 to your computer and use it in GitHub Desktop.
Save plukevdh/5d1098f83ac96453f86b201a5c2b9042 to your computer and use it in GitHub Desktop.
Ramda - Group two objects' values by keys
const groupByKey = R.compose(
R.groupBy(R.head),
R.apply(R.concat),
R.map(R.toPairs)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment