2
How do I take all the values that are inside this foreach and show off it? It only picks up the last one when I give ALERT:
var arrayAdicional = item.ingrediente_adicional.forEach(function(ingrediente)
{
prodadicional = ingrediente.ingrediente.nome;
return prodadicional;
})
alert(arrayAdicional);
What are you doing? Why does the Dictionary arrayget the return from the foreach?
– BrTkCa
Actually disregard this Dictionary array. Well I want to pass all the data from this foreach out of it, namely on a link to open on another page. If I write the link code inside it it will repeat all the values, and will create multiple links. I just want to put in a link all the returned values.
– Felipe Michael da Fonseca
Ex: '<a id='btn-modal-ingredients' class='add-Cart btn-modal-ingredients' href='#dialog' data-add = ' + arrayAdicional + ' >Open</a>
– Felipe Michael da Fonseca