Dataweave Mule4 conditional statement error

%dw 2.0
output application/json
ns ns0
Ascent_FPL__Payment_Method__c   :   if ((payload.order.payments.payment."custom-method"."custom-attributes".*"custom-attribute" filter(item) -> ([email protected]"attribute-id" == "adyenPaymentMethod")) [0] =="iDEAL") "iDEAL" else (payload.ns0#order.ns0#"custom-attributes".*ns0#"custom-attribute" filter(item) -> ([email protected]"attribute-id" == "creditCardType")) [0]

As well you have an extra custom-attributes towards the end of the xml which you need to remove.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top