I have this string
\'john smith~123 Street~Apt 4~New York~NY~12345\'
Using JavaScript, what is the fastest way to parse this into
You don't need jQuery.
var s = 'john smith~123 Street~Apt 4~New York~NY~12345'; var fields = s.split(/~/); var name = fields[0]; var street = fields[1];