It looks like you have a value as a string but need to have multiple values instead. You could try to split this string into multiple values before putting it in the array. try this one
var someValue = "servicenow,community";arr = someValue.split(','...