I have two URLs that serve data of objects in JSON
format, both formats have the same structure, except for the type of equipment:
First URL: link
{
"id": 1,
"tipo_equipo": "EquipoA", ///Esto es diferente al otro
"nomenclatura": "0501",
"etiqueta": "Sin Eqtiqueta",
"rack": "1"
}
Second URL: link
{
"id": 1,
"tipo_sw": "ADCDi-R2CU1", ///esto es diferente al de arriba
"nomenclatura": "0802",
"etiqueta": "Sin Etiqueta",
"rack": "145"
}
I would like to render a DataTable
with the data of the two urls so that I can display a single table.
$(document).ready(function($) {
$('#dataTables-example').DataTable({
ajax: {
url: '/api/switch/?rack='+{{pk3}},
//////url: '/api/equipos/?rack='+{{pk3}},
dataSrc: '',
dataType: 'json',
},
columns:[
{"data":"tipo_equipo"}, /////{"data":"tipo_switch"},
{"data":"nomenclatura"},
{"data":"etiqueta"},
{"data":"rack"},
{"data":"id"},
],
});
});
Can you please support me? Greetings.