0
I’m having the following problem, I’m doing a search engine ,to search for the client’s name ,so far so good ,I was able to bring the clients but they are in an array ,my problem is how do I divide each client into a separate line
I want it that way :
But it’s coming like this :
I have tried to use the chained $.each ,but it ends up duplicating the record ,if it is only caught one of the right record ,but the name has to be on the same line as your ID and AGE
success: function (data, status) {
var valoresID;
var arrID = [];
var arrNome = [];
var arrIdade = [];
for (var i = 0; i < data.d.length; i++) {
var item = JSON.stringify(data.d[i]["ID"]);
arrID.push(data.d[i]["ID"]);
arrNome.push(data.d[i]["Nome"]);
arrIdade.push(data.d[i]["Idade"]);
}
$('.child').remove()
$('.valorTr').after('<tr class="child"><td>'+JSON.stringify(arrID)+'</td><td>'+arrNome+'</td><td>'+arrIdade+'</td></tr>');
}
It worked, thank you I’ll see your second form.
– Robson Oliveira