Assuming this is the JSON
{
url: "",
},
{
url: "pages",
}.
{
url: "settings"
}
And we get these urls:
http://localhost:3000/dashboard/sites/327
http://localhost:3000/dashboard/sites/327/pages
http://localhost:3000/dashboard/sites/327/settings/posts
How would you make it so what is after the 'id' will be set to active, so id/[active] if one of the url above matches
Bare in mind, the 'settings/posts the posts is a folder in nextjs.