I have an input filled by foreach
(several values):
@foreach($detalles as $det)
<tr>
<input type="hidden" name="id_detalle[]" value="{{ $det->id_detalle }}">
<td><input style=" width : 60px; border: none " type="number" name="cantidad[]" id="cantidad[]" value="{{ $det->cantidad }}"></td>
<td><input style=" width : 600px; border: none " type="text" readonly name="descripcion[]" id="descripcion[]" value="{{ $det->descripcion }}"></td>
<td><input style=" width : 90px; border: none " type="number" step="0.01" name="v_unitario[]" id="v_unitario" value="{{ $det->v_unitario }}"></td>
<td><input style=" width : 90px; border: none " type="number" readonly id="v_parcial" name="v_parcial[]" value="{{ $det->v_parcial }}"></td>
</tr>
@endforeach
How can I pass the input values id="cantidad[]"
to an array in javascript?