Created
November 20, 2010 20:33
-
-
Save mwmitchell/708130 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
(def r [{:id 1, :f "a"} {:id 1, :f "b"} {:id 2, :f "a"}]) | |
; how to transform into: | |
[{:id 1 :f ["a" "b"]}, {:id 2 :f ["a"]}] | |
; reduce? | |
; note: the items inside of r will potential have lots of keys, but i only want to "collapse" the :f key into an array |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment