Hi,
This is probably really simple and I'm being dense, but how do you get the specific value of a query given the key.
For instance, let's say I define a query:
wixLocation.queryParams.add({
"day": y //I defined y above
});
Later, how can I get the value of the "day" query key from the URL?
Thanks!
Hey @ClimateActivist 🖐
You can access the properties of the query by using the query object, here's how:
const day = wixLocation.query.day;
It's your responsibility to check if the property exist on the query or not before assigning its value to variable or use it in your code.
Hope this helps~!
Ahmad