Well that's my concern, through ajax I receive the objects in a list,
listaConfiguracionSucursales = data.lista;
I want to know if there is any way to get all the data of a certain field from that list, now I only receive a value of a given field as follows ipControlador = listaConfiguracionSucursales[$("#comboboxSucursales").val()].ipControlador;
the data of the list I want to obtain belong to the ipController field, but I want the complete list, try with a for cycle, but do not show them in the view, any suggestions? I thank you
Currently this is the way you try to get the data from that list with the for cycle
.post(
'ConsultasRms/tabla_consultaProductos.html',
formulario.serialize(),
function (data) {
$("#loading").hide();
comboSucursales = document.getElementById('comboboxSucursales');
sucursalConsulta = comboSucursales.options[comboSucursales.selectedIndex].text;
console.log('contenido1',sucursalConsulta);
ipControladores = data.lista;
console.log('listaCOMPLETA',ipControladores);
for(z = 0; z < ipControladores.length; z++){
var datarow = {
sucursal: sucursalConsulta,
numeroSucursal: comboSucursales.options[comboSucursales.selectedIndex].value,
ip: ipControladores[z].ipControlador,
};
var su = jQuery("#tablaProductoRms")
.jqGrid('addRowData', cont, datarow);
cont++;
}