I have this array of arrays, to show a use value:
alert(var_dump(objView.ArrayStock[1][0].STOCK_REAL));
ArrayStock:[[{BODEGA: "01", STOCK_REAL: "17.00"}, {BODEGA: "03", STOCK_REAL: "9.00"}],…]
0:[{BODEGA: "01", STOCK_REAL: "17.00"}, {BODEGA: "03", STOCK_REAL: "9.00"}]
0:{BODEGA: "01", STOCK_REAL: "17.00"}
1:{BODEGA: "03", STOCK_REAL: "9.00"}
1:[{BODEGA: "01", STOCK_REAL: "17.00"}, {BODEGA: "03", STOCK_REAL: "9.00"}]
0:{BODEGA: "01", STOCK_REAL: "17.00"}
1:{BODEGA: "03", STOCK_REAL: "9.00"}
2:[{BODEGA: "01", STOCK_REAL: "17.00"}, {BODEGA: "03", STOCK_REAL: "9.00"}]
0:{BODEGA: "01", STOCK_REAL: "17.00"}
1:{BODEGA: "03", STOCK_REAL: "9.00"}
Currently for normal arrays use:
$.each(objView.ArrayStock, function (indice, elemento) {
alert(indice + " : " + elemento.STOCK_REAL);/* no se como recorrerlo cuando es un array de arrays*/
});
In what way would I have to go to show only the "STOCK_REAL" of the 3 arrays ?, I imagine that I have to use two each or there will be a simpler way to traverse it.
This is what I carry, I can show only one element:
$.each(objView.ArrayStock, function (indice, elemento) {
alert(indice + " : " + elemento[indice]);
each(elemento,function(indice2, elemento2) {
alert(indice + " : " + elemento2[indice2].STOCK_REAL);
});
});