Can someone show me the javascript I need to use to dynamically create a two dimensional Javascript Array like below?
desired array contents:
It sounds like you want to map the array of text for each $something
element into an outer jagged array. If so then try the following
var outterArray = [];
$something.each(function () {
var innerArray = [];
$(this).somethingElse.each(function () {
innerArray.push($(this).text());
});
outterArray.push(innerArray);
});
alert(outterArray);