function discountwithCustId(data){
                    
                    for(var i = 0; i < data.length; i++){
                        if(data[i].discountCode.discountCode === "H"){

                                codeH.push(data[i].customerId);
                        }else if(data[i].discountCode.discountCode === "M"){
                                codeM.push(data[i].customerId);
                        }else if(data[i].discountCode.discountCode === "L"){
                                codeL.push(data[i].customerId);
                        }else if(data[i].discountCode.discountCode === "N"){
                                codeN.push(data[i].customerId);
                        }
                    }
                    
                }
//Function to see which customer id is with which discount code
Function to see which customer id is with which discount code
Function to see which customer id is with which discount code
function discountwithCustId(data){
                    for(var i = 0; i < data.length; i++){
                        if(data[i].discountCode.discountCode === "H"){
                                codeH.push(data[i].customerId);
                        }else if(data[i].discountCode.discountCode === "M"){
                                codeM.push(data[i].customerId);
                        }else if(data[i].discountCode.discountCode === "L"){
                                codeL.push(data[i].customerId);
                        }else if(data[i].discountCode.discountCode === "N"){
                                codeN.push(data[i].customerId);
                        }
                    }
                }
function discountwithCustId ( data ) { for ( var i = 0 ; i < data . length ; i ++ ) { if ( data [ i ] . discountCode . discountCode === "H" ) { codeH . push ( data [ i ] . customerId ) ; } else if ( data [ i ] . discountCode . discountCode === "M" ) { codeM . push ( data [ i ] . customerId ) ; } else if ( data [ i ] . discountCode . discountCode === "L" ) { codeL . push ( data [ i ] . customerId ) ; } else if ( data [ i ] . discountCode . discountCode === "N" ) { codeN . push ( data [ i ] . customerId ) ; } } }
Function to see which customer id is with which discount code
Function to see which customer id is with which discount code