This question already has an answer here:
var url = "journey?reference=123line=A&destination=China&operator=Belbo&departure=1043&vehicle=ARC"
How can I split the string above so that I get each parameter's value??
This question already has an answer here:
How can I split the string above so that I get each parameter's value?? |
|||||||||
marked as duplicate by Diodeus, Ian, Cameron Tinker, senshin, Joe May 5 '14 at 21:23This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
|||||||||
|
You could use the split function to extract the parameter pairs. First trim the stuff before and including the
See jsfiddle |
|||
|
to split line in JS u should use:
|
|||||||||
|
Try this:
|
|||
|