I have a URL that looks something like this after decoding using decodeURIComponent
https://secretStar.22.test.com/l/{"mode":"test","app":"revenue:app","param2":1,"loaded":{"APPLICATION@markup://revenue:app":"unique_identifier"},"pathPrefix":"","xx":1}/script22.js
Now, I would like to extract few details from this URL , for Ex:
mode = test
app = revenue:app
param2 = 1
appMarkupRevenueApp = unique identifier
scriptName = script.js
I could have extracted it using qs params if these values were qs params. I was able to extract the information by writing a function that splits and joins and then splits again but that is not very efficient when it comes to extracting these params from more than 4k urls in a csv file.
Is there a better way to extract these? I can think of regex but I am not very familiar with that and could not get that to work.