Currently, I am storing the client and product details along with quantity in an array. Here is how it looks:
var idCliente = $scope.myClient.codigo;
var nombreCliente = $scope.myClient.nombre;
var idProducto = $scope.myProduct.codigo;
var nombreProducto = $scope.myProduct.nombre;
var cantidad = $scope.cantidad;
data = [];
data.push({ idCliente, nombreCliente, idProducto, nombreProducto, cantidad });
I am not sure how to create a new object to append it to the existing list. Any guidance on this would be appreciated.