Proof if property quantity is > 1 then push price * quantity : the function below loops through the properties of the objects in `var input` which is for example `[ { name: 'Nagellack 15 ml 2 2', id: '1057290002', price: '1.9', brand: 'a.o.n.', quantity: 1 }, { name: 'Ceramic Nail Lacquer 6 ml Coral Reef Coral Reef', id: '1027410001', price: '6.9', brand: 'Artdeco', quantity: 1 } ]` and pushes new objects into `products_list []`

I'm trying to set up a condition which proofs when the quantity of an object is  > 1 and then multiplies the price with the quantity. The issue here is, that I only get the price of one product although there is a quantity of 2. 

I don't know which is the best place in the code set up the condition. 

    function() {
        var input = {{dl_purchase_products}};
        var products_list = [];
            for(i=0;i<input.length;i++){
            products_list.push({
                id: input[i].id.slice(0,6),
                price: input[i].price,  <---- this should be the price for 2 
                quantity: input[i].quantity
            });
            }
        return products_list;
    }

Thanks a lot!

Best regards, 
Anton