Extracting part of string as a collection variable

Hi. I’d like to extract this part of URL property as a collection variable. Having only that piece of code, it extracts the whole string. I’d like to get only the part after the equal sign.

I’ll be grateful for the help!

You can use the JavaScript Split() method.

let URL = "https://somewebsite.com/somepath&session_id=123456"
let session_id = URL.split('=')[1]
console.log(session_id); // "123456"
1 Like

Thanks! Adding split() after URL did the trick:


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.