#Input
{
"street": "ABCS",
"code": "1234"
}
If sizeOf(code)>10 I need to append with street like "ABCD 1234" and remove the code key.
{
"street": "ABCS",
"code": "12345678910"
}
{
"street": "ABCS 12345678910"
}
Like that if sizeOf(code)<10 and street= null. I need to remove street key.
{
"street": null,
"code": "12345"
}
{
"code": "12345"
}
If sizeOf(code)>10 and street = null remove the code key and add the value to street.
{
"street": null,
"code": "12345678910"
}
{
"street": "12345678910"
}
I need to get all these scenarios in single response. Can anyone help me on this.
Regards
Niranjan K
@Mohammed Abdul Khader Sufi
Thanks for you response.
But I need to verify both the fields. Last condition is not working. If code > 10 and street =null remove code and paste whatever the value coming from code to street.
Is it possible to write down the condition in below similar way.
{
"street": condition,
"code": condition
}
Regards
Niranjan K