I have a collection of arrays, each containing a set of list items, which I am displaying using console.log(jobsList);
. The output looks like this:
The variable jobsList
is generated by adding arrays created inside a for loop like this:
for (var i=0; i < teamList.length; i++ ) {
jobDirectory.push(newJob);
}
jobsList.push(jobDirectory);
We then arrange the arrays by their length in the following way:
jobsList.sort(function(a,b){
return a.length < b.length;
});
I want to display each array within an unordered list. The expected output should be as follows:
<h3></h3><ul>//insert list items here</ul>
This process will be repeated for each top-level array.
$('.row').append(jobsList);
is causing an error. How can I display all the arrays within an unordered list as described above?