Wednesday, August 21, 2019

jquery - Splitting a key value pair response seperated by a '&' using Javascript







I have a response that I receive from the server in this format - Status=105&Accno=1458874455&Name=XYZ&Bal=5,888.00
Here '&' signifies separator.




I need to iterate through the string response and split this string in JavaScript based on the '&' and get the values and store them as :



Status=105
Accno=1458874455
Name=XYZ
Bal=5,888.00


so that I can populate them in the respective textbox and drop down.




I am using jQuery and AJAX for receiving the response.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...