on 2021 Dec 20 10:34 AM
Hi Experts,
can you please help with your valuable inputs for my below requirement.
I receive payload which contains below values for one of the field in my source structure and these values need to be split and needs to pass different fields in the target structure.
Input : ORDERS05,ORDERS05_01,ORDERS,n.a.,n.a.,SAPXXX,XXXCLNT000,LS,LS,ONECPI,AB_CD_YYYY,LS,n.a.
expected output:
field1:ORDERS05
field2:ORDERS05_01 and so on....
Request clarification before answering.
Hi Mohan,
You can probably split that input string by using "," as a delimiter and then capture the result into a list. Use the resulting list then to create your output structure.
Sample Code:
def Input = "ORDERS05,ORDERS05_01,ORDERS,n.a.,n.a.,SAPXXX,XXXCLNT000,LS,LS,ONECPI,AB_CD_YYYY,LS,n.a"
def OutputList = Input.split(',').collect{it as String}
Hope this helps.
Best Regards,
Amal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks so much for your inputs.
User | Count |
---|---|
42 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.