I am trying to figure out how to convert a string to an object. The separators are the | characters. So essentially this:
var myString = "Name, Bob | Location, Washington | Pet, Dog";
Becomes:
var myObj = {
Name: "Bob",
Location: "Washington",
Pet: "Dog"
};
Thanks in advance for any helpful input.