Created
May 5, 2016 15:35
-
-
Save scrooby/698f29844995f39341a4ceb02434c3b3 to your computer and use it in GitHub Desktop.
flatten object to key value pairs
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 identifiers = { | |
id: 1, | |
referenceNumber: '123' | |
}; | |
const convert = R.compose(R.map(R.zipObj(['key', 'value'])), R.toPairs); | |
convert(identifiers); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment