How do I create a JSON with several different names?
Same: [{name: "john"}, {name: "pedro"}]
Could someone give me an example?
I tried to do so, but why does it always return the last item twice? Type John in the first and second, Peter twice?
$(".item-tbody .nome").each(function ()
{
obj.nome = $(this).parent().find('.nome').text();
arrayObj.push(obj);
nomeArray = JSON.stringify(arrayObj);
alert(nomeArray);
});