Getting the value of a H1 from another page

Getting the value of a H1 from another page

I was looking at a method of taking an H1 from another page
  1.  $.get('001.html', function(html){ 
          $('#target').text($('h1',html).text()); 
    });

This is from another site and replaces an item with the ID of "target" on the current page.
What I would like to be able to do is include this in a Loop and assign the H1 values to an array, but I cannot seem to be able to do it.



Any able to advise?

TC