如何在 Jasper 中格式化以下 if/else?

How do I format the following if/else in Jasper?

我正在尝试在 Jasper 中格式化以下 if/else 但遇到了问题。这是我的,但我的语法错误有人可以帮忙吗?

$F{PAYMENT_METHOD_DATA}  == {"deposit_name":"PayNearMe","is_important":true,"logo":"https:\/\/nj-cdn-casino.ballyinteractive.com\/cms\/V3\/Deposit-Methods\/icon-Paynearme.png"} ? "PayNearMe" :
$F{PAYMENT_METHOD_DATA} ==  {"deposit_name":"ACH (Optimal)","withdrawal_name":"ACH (Optimal)","display_order":"101","is_important":true} ? "ACH" :
$F{PAYMENT_METHOD_DATA} ==  {"deposit_name":"wire transfer","withdrawal_name":"wire transfer","display_order":"42","is_important":true} ? "Wire Transfer" :   
$F{PAYMENT_METHOD_DATA} ==  {"deposit_name":"Personal check","withdrawal_name":"Personal check","display_order":"6","is_important":true} ? "Personal Check" :
$F{PAYMENT_METHOD_DATA} ==  {"deposit_name":"Cashier''s check","withdrawal_name":"Cashier''s check","display_order":"7","is_important":true} ? "Cashiers Check": "Cash"

三元运算符应该是like

condition ? execute true code : execute false code

jasper 条件应该是这样的,

$F{PAYMENT_METHOD_DATA}  == "deposit_name"?"PayNearMe":"PayMe"

如果你想检查多个条件,那么你应该这样写,

$F{PAYMENT_METHOD_DATA}  == "deposit_name"?($F{PAYMENT_METHOD_DATA}  == "deposit_name_other"?"PayNearMeYes":"PayMeYes"):"PayMe"