I am trying to fill a "completed" field if the "total" and the "current" fields match and i can´t figure the spec for it.
Being my original JSON:
{
"data": {
"aField": {
"current": 5
},
"otherField": {
"total": 5
}
}
}
I´m expecting a result like:
{
"status": "completed"
}
In case I receive any other JSON where the current and total don´t match I would like another output like:
{
"data": {
"aField": {
"current": 4
},
"otherField": {
"total": 5
}
}
}
I´m expecting a result like:
{
"status": "not completed"
}
And in case there is no current and/or total fields, the expected result will be:
{
"status": "not found"
}
You can use the following transformation :