0

string:

?utm_campaign=My+Campaign+Name&utm_medium=email

I want to turn this into an object:

{    
  utm_campaign: "My Campaign Name",
  utm_medium: "email"
}

I'm trying to find a way to accomplish this with the querystring module but can't seem to do it. Thank you!

1 Answer 1

1

Your problem is the &. It should be & otherwise it is treated as a regular character and not the special character separating query parameters.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.