Am fairly new to Dataweave, trying to achieve simple if else condition based on below
if (vars.country == "USA")
{ currency: "USD" }
else { currency: "EUR" }
This works fine. However, when I am trying with other json variables as below, it fails
%dw 2.0
output application/json encoding="UTF-8"
---
Name: "ABC",
if (vars.country == "USA")
{ currency: "USD" }
else { currency: "EUR" }