I am given the below json and it needs to be concatenated based on condition if it not null
Can someone help me out here?
expected output
{
"id": "4583",
"price": "149.99 EUR",
"sale_price": ""
}
In above json price was concatenated with EUR but sale_price is as it is because it is null.
I am using below jolt, it us updating sale_price as well.
{
"operation": "modify-overwrite-beta",
"spec": {
"price": "=concat(@(1,price),' USD')",
"sale_price": ["=isNull", "=concat(@(1,sale_price),' USD')"]
}
}