Reputation: 360
I have the following mapping template
#if($input.params('salutation'))
"greeting": "$input.params('salutation')",
#else
"greeting": "Hello",
#end
"target": "$input.params('candidate')"
}
and the if statement is always evaluating to true.
If I pass in the salutation param, it is used, which I expect. If I do not pass in the optional salutation param the greeting is an empty string ie "greeting": ""
What am I missing?
Upvotes: 0
Views: 19