I'm trying to get a multidimensional object output from .map(), the final format I would like to get something like { "key" : { key : value, key : value }, "key" { key : value, key : value }, ... }.
Here's some code http://pastie.org/1524749
I've tried in different ways without success since when I send it through ajax, I get array undefined in PHP
var arrData = $('#orDetColProducts .lineBottomRow').map(function(){
intRef = $(this).find('._ref').text();
intPrice = $(this).find('._intPrice').text();
intQuantity = $(this).find('.existStock').val();
if (intRef && intQuantity) {
return '{' + intRef + ' : { quantity : ' + intQuantity + ', price : ' + intPrice + '}' + '}';
}
});