I wish to transform my JSON Payload based on a set of lookup values in WSO2 ESB.
e.g.
input
[
{
"name" : "Apple",
"type" : "fruit"
},
{
"name" : "Cabbage",
"type" : "fruit"
},
{
"name" : "Rice",
"type" : "grains"
}
]
Expected Output
[
{
"name" : "Apple",
"type" : "perishable"
},
{
"name" : "Cabbage",
"type" : "perishable"
},
{
"name" : "Rice",
"type" : "non-perishable"
}
]
Lookup Table for transformation.
{
"fruits": "perishable"
"grains": "non-perishable"
}
I have tried looking into DataMapper mediator but that does not support as far as I understand.
How to achieve this type of transformation? Kindly help me with this.
question from:
https://stackoverflow.com/questions/66064373/transform-payload-values-based-on-a-lookup-table-in-wso2-esb 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…