Skip to main content

#Input

 

{

 

"street": "ABCS",

 

"code": "1234"

 

}

If sizeOf(code)>10 I need to append with street like "ABCD 1234" and remove the code key.

#Input

{

"street": "ABCS",

"code": "12345678910"

}

#Output

{

"street": "ABCS 12345678910"

}

 

Like that if sizeOf(code)<10 and street= null. I need to remove street key.

#Input

{

"street": null,

"code": "12345"

}

#Output

{

"code": "12345"

}

If sizeOf(code)>10 and street = null remove the code key and add the value to street.

#Input

{

"street": null,

"code": "12345678910"

}

#Output

{

"street": "12345678910"

}

I need to get all these scenarios in single response. Can anyone help me on this.

 

Regards

Niranjan K

3 respuestas
  1. 12 may 2022, 11:44

    @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

0/9000