index and input are not part of the array indexes, they are properties. Simple test would show this
console.log(result[3]); //undefined
console.log(result.index); //1
If you coded the result manually, it would be like
var result = ["dbBd", "bB", "d"];
result.index = 1;
result.input = "cdbBdbsbz";
console.log(result);
console.log(result.toString());
If you want to get all the values, you will have to use a for in loop and build a new array adding the properties as objects.
var re = /d(b+)(d)/ig;
var result = re.exec("cdbBdbsbz");
var updatedResult = []; //An empty array we will push our findings into
for (propName in result) { //loop through the array which gives use the indexes and the properties
if (!result.hasOwnProperty(propName)) {
continue;
}
var val = result[propName];
if(isNaN(propName)){ //check to see if it is a number [sketchy check, but works here]
var obj = {}; //create a new object and set the name/value
obj[propName] = val;
val = obj;
}
updatedResult.push(val); //push the number/object to the array
}
console.log(JSON.stringify(updatedResult)); //TADA You get what you expect