Find If Array Contains Value Javascript Substring Until Character