Uffff!!!!
¡¡Conseguí dar con ello!!
Código javascript
:
Ver originalarr_a = "[";
arr_b = "[";
for (x = 0; x < ob_3.value; x++)
{
var ob_4 = document.getElementById("name_attendee_" + (x + 1) + "_a");
var ob_5 = document.getElementById("name_attendee_" + (x + 1) + "_b");
var in_4 = ob_4.selectedIndex;
var in_5 = ob_5.selectedIndex;
var va_4 = ob_4.options[in_4].value;
var va_5 = ob_5.options[in_5].value;
if (x == (ob_3.value - 1))
arr_a = arr_a + "{\"num_hab\":" + (x + 1) + ",\"num_ad\":" + va_4 + "}"
else
arr_a = arr_a + "{\"num_hab\":" + (x + 1) + ",\"num_ad\":" + va_4 + "},"
if (x == (ob_3.value - 1))
arr_b = arr_b + "{\"num_hab\":" + (x + 1) + ",\"num_ni\":" + va_5 + "}"
else
arr_b = arr_b + "{\"num_hab\":" + (x + 1) + ",\"num_ni\":" + va_5 + "},"
}
arr_a = arr_a + "]";
arr_b = arr_b + "]";
¡Muchísimas gracias por tu ayuda, venkman!