I have a string like:
Id=bzat4e&Name=Gallery: Blitzer: Algebra & Trigonometry, 4e&Year=2016&Code=bzat4e
and I want to split it on the basis of &
, while allowing the &
inside values.
Basically it is a string of url parameters and I am fetching the value on the basis of key in my JavaScript.
I/P
var paramList = Id=bzat4e&Name=Gallery: Blitzer: Algebra & Trigonometry, 4e&Year=2016&Code=bzat4e
O/P
[Id="bzat4e", Name="Gallery: Blitzer: Algebra & Trigonometry, 4e", Year="2016", Code="bzat4e"]