How to split the string value with pipe (|) and print in api

Have json response with string value "stringval": "jklah-dw-4c8d-8320-das313s3ASsda|000725N8WuUrfwAS7alP|banker_name"]] how to split the values and print

This works for me :slight_smile: though of sharing it

def st = jklah-dw-4c8d-8320-das313s3ASsda|000725N8WuUrfwAS7alP|banker_name
def sep = st.split("\\|")
def sessionopentoken = sep.value[0]
def sessionopenguid = sep.value[1]
def sessionopenBroker =  sep.value[2]
1 Like