I am trying to split an argument from request to put into the response like the next example:
The API requires to put the next format:
I know that using request_argument have the value
But I want just the name of the city not the code of the country
Is there any way to do it?
I am usign CA Service Virtualization Community Edition.
I am wondering if using substring in the response would help you on this.
Please, take a look at the posts below regarding substring:
How to extract a substring of characters from a string spread across multiple lines?
Substring script in beanshell
Hope it helps.
Adding to what deoma03 mentioned above - please check if the following expression works in your case - where q is the incoming argument name.
Sure, it was very helpful, another option is using split like this:
Thanks for help me deoma03 and Prem_Bairoliya.