I'm getting the response from my third party like the below
I have to parse the default message array in the url link at the end %20default%20message%20[This%20Claim%20has%20an%20Corrected%20Claims%20which%20is%20not%20yet%20approved.]
and show the error msg inside it.I've used split method but I can get only the url its not giving the last array. I've tried to remove the %20 using replace but I'm unable to get the default message array.
var str = "https://app-pv.myfamily.com/myconnect/myapp/myDetails?myDetailsNbr=U123763673&source=myAppsearch&error=[[Error%20in%20object%20%27myStatusModel%27:%20codes%20[claims.correct.adjust.notsubmitted.27myStatusModel,myApp.correct.adjust.notsubmitted];%20arguments%20[];%20default%20message%20[This%20Claim%20has%20an%20Corrected%20Claims%20which%20is%20not%20yet%20approved.]]]";
var url = str.replace(/%20/g, "");
console.log(url.find,'ppp')