I am calling two functions and checking if the given input has barcode and qr code
var decode = jsQR.decodeQRFromImage(rawImageData.data, rawImageData.width, rawImageData.height);
checkBarCode(function(err, result) {
if (result) {
Result.pages.push({
ValidTicket: decode ? true : false //here i want to assign true or false if barcode or qr code is present.
});
}
});
is this correct?
ValidTicket: decode || result ? true : false