string = "firstName:name1, lastName:last1"; This will work: var fields = string. split(', '), field Obje ...
stackoverflow.com