Skip to content

Instantly share code, notes, and snippets.

@ganeshran
Created August 28, 2014 17:29
Show Gist options
  • Save ganeshran/88e8ad96fa2fd4004055 to your computer and use it in GitHub Desktop.
Save ganeshran/88e8ad96fa2fd4004055 to your computer and use it in GitHub Desktop.
#this is my ruby hash
{"link"=>3, "question"=>1, "status_message"=>1}
#I am trying to convert to this form
{ { xval: 'link', count: 3},
{ xval: 'question', count: 1},
{ xval: 'status_message', count: 1}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment