Skip to content

Instantly share code, notes, and snippets.

@bdavidxyz
Created October 4, 2018 13:11
Show Gist options
  • Save bdavidxyz/d1c3d6a01c12e1295a80be4093a779ee to your computer and use it in GitHub Desktop.
Save bdavidxyz/d1c3d6a01c12e1295a80be4093a779ee to your computer and use it in GitHub Desktop.
JSON.stringify({
h1:$('h1').map(function(){return $.trim($(this).text());}).get(),
h2:$('h2').map(function(){return $.trim($(this).text());}).get(),
h3:$('h3').map(function(){return $.trim($(this).text());}).get(),
h4:$('h4').map(function(){return $.trim($(this).text());}).get(),
h5:$('h5').map(function(){return $.trim($(this).text());}).get(),
h6:$('h6').map(function(){return $.trim($(this).text());}).get()
},null, 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment