get substring before particular character in javascript code example
Example: js get substring before character
//split string into an array and grab the first item
var streetaddress = addy.split(',')[0];
//split string into an array and grab the first item
var streetaddress = addy.split(',')[0];