Skip to content

Instantly share code, notes, and snippets.

@devn
Created February 27, 2013 20:04
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 devn/b356d6186d845ceadad5 to your computer and use it in GitHub Desktop.
Save devn/b356d6186d845ceadad5 to your computer and use it in GitHub Desktop.
[{:date1
[{:user "user 1"
:metric1 1
:metric2 2}
{:user "user 2"
:metric1 3
:metric2 4}]}
{:date2
[{:user "user 1"
:metric1 5
:metric2 6}
{:user "user 2"
:metric1 7
:metric2 8}]}]
;; becomes
[{:metric1
[{:date1 [{"user 1" 1}
{"user 2" 3}]}
{:date2 [{"user 1" 5}
{"user 2" 7}]}]}
{:metric2
[{:date1 [{"user 1" 2}
{"user 2" 4}]}
{:date2 [{"user 1" 6}
{"user 2" 8}]}]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment