I have the following code snippet
$("#personalizacoesOpcionais")
.find(".qtdPersonalizacao")
.each(function (n, t) {
var i = {};
i.IdProdutoIngrediente = parseInt($(t).attr("data-id"));
i.Qtde = parseFloat($(t).text());
r[n] = i
});
In the html there are several divs personalizacoesOpcionais
and each one with numerous elements qtdPersonalizacao
.
However, the code snippet above only returns the first item qtdPersonalizacao
within the first personalizacoesOpcionais
.