Skip to content

Instantly share code, notes, and snippets.

@thomasballinger
Created February 20, 2013 23:21
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 thomasballinger/5000642 to your computer and use it in GitHub Desktop.
Save thomasballinger/5000642 to your computer and use it in GitHub Desktop.
var data = $('.message_row, .recipient_row').map(function(i, x){
return {
name : jQuery.makeArray($(x).find('.sender_name').map(function(i, x){return x.innerText})),
message : jQuery.makeArray($(x).find('.message_content').map(function(i, x){return x.innerText})),
time : jQuery.makeArray($(x).find('.message_time').map(function(i, x){return x.innerText})),
stream : jQuery.makeArray($(x).find('.stream_labels').map(function(i, x){return x.innerText})),
subject : jQuery.makeArray($(x).find('.narrows_by_subject').map(function(i, x){return x.innerText}))
};
})
var s = JSON.stringify(jQuery.makeArray(data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment