Javascript String splitenum(separator)
String.prototype.splitenum = function(separator){ var tokens = this.split(separator); var obj = {}//from w ww . ja v a 2s . co m for (var i=0; i< tokens.length; i++ ){ obj[i] = tokens[i]; } return obj; }