var result = {}
var reg = /([^,\r\n]+),([^,\r\n]+)/g
while(reg.exec(str)){
if(!result[RegExp.$1]){
result[RegExp.$1] = [RegExp.$2]
}else{
result[RegExp.$1].push(RegExp.$2)
}
}
console.log(result)
var result = {}
var reg = /([^,\r\n]+),([^,\r\n]+)/g
while(reg.exec(str)){
if(!result[RegExp.$1]){
result[RegExp.$1] = [RegExp.$2]
}else{
result[RegExp.$1].push(RegExp.$2)
}
}
console.log(result)