jQuery .each element in other URL content
<p>This is the third time I've tried getting help with this on stackoverflow.
Basically what I am trying to do is get a url page, then grab content from each element 'tr.r1.lastrow td.cell.c0'.  </p>

<p>Everything about the code is working except the innermost .each loop.  I believe I have just wrote the each function wrong.  What am I doing wrong here?  </p>

<p>Edit: this has been solved san substr, which is just an error.  Thanks all.</p>

<pre><code>var allLessonsArray= new Array();
$.each(lessonInTopicSectionArray, function(index, lesson){   
    var lastAttempt = 0;
    url='------/learn/mod/lesson/report.php?id='+lesson.id+'&amp;action=reportdetail&amp;userid='+userid+'&amp;try='+lastAttempt;
    $.get(url, function(data) {
        var lessonArray= new Array();
        $('tr.r1.lastrow td.cell.c0').html(data).each(function(index, content) {
            alert(jQuery(content).html());
            score=parseInt(content.substr(content.length - 1));
            lessonArray[index]=score;
        });     
    allLessonsArray[index]={name:lesson.name, score: lessonArray};  
    }); 
});
</code></pre>
