Mule 3.8.5 + Data-weave code query :-
I am trying to fetch records from mongodb which is equal to the code passed in input query param OR if the code is equal to static String "ALL".
the above is not working, can anyone suggest the correct syntax to write in transform message component?
%dw 1.0
%output application/json
---
{
"code" : [ upper inboundProperties."http.query.params".code or "ALL"]
}
Example if i pass code as "IND" it should return me records having code equal to "IND" or "ALL". result = IND, ALL, ALL.