现在仅需要与此有关的小帮助,我有一个返回数据price": { "pretax_price": 7002.84, "rack_rate": 8140.82, "wallet_deductable_amount": 0, "voucher_amount": 0, "total_discount_percent": 92.75, "net_payable_amount": 4131.68, }
的api。现在,我要尝试的操作是* def pretax =price.pretax_price
仅在* def valueFromDB == true
时才应调用valueFromDB来自数据库
答案 0 :(得分:0)
请。读。的。文件:https://github.com/intuit/karate#conditional-logic
* def pretax = valueFromDB ? price.pretax_price : pretax