var dog = 'john smith~123 Street~Apt 4~New York~NY~12345'; var values = dog.split('~');
var name = values[0]; var street = values[1];