You can get the URL object using
window.location.href like this:
let url = new URL(window.location.href)
Then, parse that URL with
split to get the data you need:
let id = url.pathname.split('/')
In this case, the URL I got was
pathname is equal to
1 is the ID of the data object I need.
Once you've got the ID, you can use it in an axios call to get the data you need.