How to extract query parameters from wordpress permalinks to be used in javascript?

What is the best way to extract query parameters from WordPress urls in javascript. Urls are pure permalinks without “?”.
The worpdress site is multilinugual (WPML), so the will be url varations. The same value has to be exctracted from different permalink equivalents.

example.com/location/1

example.com/de/lage/1

Read more here: How to extract query parameters from wordpress permalinks to be used in javascript?

Leave a Reply

Your email address will not be published. Required fields are marked *