Created
September 21, 2016 21:49
-
-
Save plukevdh/5d1098f83ac96453f86b201a5c2b9042 to your computer and use it in GitHub Desktop.
Ramda - Group two objects' values by keys
This file contains hidden or 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 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