+ Start a Discussion
Base Line 7Base Line 7 

get parameter from url of custom app using Javascript

I have a custom app to which I navigate using a custom button. I would like to access a parameter from the url of the app using Javascript but I don't know how. All I have found online thus far is how to do so using Apex. Do I have to use lightning:isUrlAddressable or is there another way to go about it?
For instance, if the url is 
https://<my domain>/c/MyCustomApp.app?action=edit&myId=9
 how do I get the myId=9 part of the query using Javascript? Any help is much appreciated.