Imrpove the following code without if/else I want to avoid using multiple if and else condition here 

  if (decode) {
                Imagepath = bucket + "/" + key;
                Result.pages.push({                         
                        Id: Processid,
                        ValidTicket: decode ? true : false
                });
        } else {
                //checking for barcode if qr code is not present
                Quagga.decodeSingle({
                        src: filename,
                        numOfWorkers: 0, // Needs to be 0 when used within node 
                        decoder: {
                                readers: ['code_128_reader',
                                        'ean_reader',
                                        'ean_8_reader',
                                        'code_39_reader',
                                        'code_39_vin_reader',
                                        'codabar_reader',
                                        'upc_reader',
                                        'upc_e_reader',
                                        'i2of5_reader'
                                ] // List of active readers 
                        },
                }, function (result, error) {
                        //if guaggajs returns the result
                        if (result) {
                                console.log("bar code done");
                                //sometimes result is not empty but codeResult is empty
                                if (result.codeResult) {
                                        var barcode = result.codeResult.code;
                                        var Imagepath = '';
                                        Imagepath = bucket + "/" + key;
                                        Result.pages.push({
                                                Id: Processid,
                                                ValidTicket: barcode ? true : false
                                        });
                                        console.log("final array is" + Result);
                                } else {
                                        var Imagepath = '';
                                        Imagepath = bucket + "/" + key;
                                        Result.pages.push({
                                                Id: Processid,
                                                ValidTicket: false
                                        });

                                }
                        } else {
                                var Imagepath = '';
                                Imagepath = bucket + "/" + key;
                                Result.pages.push({
                                        Id: Processid,
                                        ValidTicket: false
                                });

                        }
                });
        }
I would separate them out into functions to make the code more readable. So the first if/else would become:

if (decode)
  doDecode()
else
  doEncodeSingle();


I would also break the doDocdeSingle up:

Quagga.decodeSingle({...},
  handleDecodeResult );


The last if/else is currently structured as:

if (result) {
  if (result.codeResult) {
    // Handle Code
  } else {
    // Handle no-code
  }
} else {
  // No result
}


I often find it cleaner to reverse the condition and structure it as:

if (!result) {
  // No result
} else if (result.codeResult) {
  // Handle Code
} else {
  // Handle no-code
}


Which removes a level of nesting. Again I would try and make each if section a single function call.