Reputation: 369
I want use if-else to handle show an item when the value is not null. when vars.request-id != null or not isEmpty(vars.request-id) output {requestID:"" ,origin_uri:"", errorDesc: ""}
when vars.request-id == null or isEmpty(vars.request-id) output {origin_uri:"", errorDesc: ""}
but the following code is Unable to resolve
{
requestID : ("Midend-correlation-id": vars.request-id) if (vars.request-id != null)
origin_uri: vars.errorContent.uri
errorDesc: vars.errorContent.message
}
Upvotes: 0
Views: 252
Reputation: 4303
Is this what you are after? I am not very clear on the ask and from what i understand i tried to scribble something for you. Maybe a clear input , some condition and the expected output would help..
Upvotes: 1