By clicking the button, run this code down
It was to generate only one position of the array. In the case it is generated 3 positions, as if it had happened 3 tests
$(document).on('click','#btnSegundaEtapa',function () {
var arrayObjCat1 = [];
$(".form-group").find('*').each(function(){
var id = $(this).attr("id");
if($(this).is(':checked')){
if ( $("input[type='radio'][name='Licenciamentodeusuários']").is(':checked') ) {
className = $("#"+id).data('class-name');
vlrUnitario = $("."+className).text();
vlrUnitario = vlrUnitario.replace("$","");
vlrUnitario = parseFloat(vlrUnitario.replace(',','.'));
arrayObjCat1.push({part_number:$('#'+id).data('part-number'), nome_item:$('#'+id).data('nome-item'),qtde:$('#'+id).val(),preco_unitario:vlrUnitario});
console.log(arrayObjCat1);
}
}
})
});