on 06-16-2022 5:45 AM
Hi,
I need your help on groovy script to read the data which is present only brackets and remaining text ignore for the positionCode which comes in output JSON file attached for your ref..
positionCode":"Senior Consultant - HCM (50001234) ---required output is “positionCode”: 50001234
hi,
thank you for your response. when i tried with groovy script in mapping as below - its not working.
import com.sap.it.api.mapping.*
def String exampleSingleValue(String s, MappingContext context) {
//Your code here
String s = 'positionCode":"Senior Consultant - HCM (50001234)'
tempString = s.substring(s.indexOf("(") + 1);
resultString = tempString.substring(0, tempString.indexOf(")"));
return result;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.