var db = [
['a', 'b', '1', '2'],
['a', 'c', '3', '4'],
['b', 'd', '5', '6']
];
var dbIndex0;
var concat='';
var i, j;
for(i=0; i<db.length; i++) {
if(db[i][0]=='a'&&db[i][1]=='b'){
dbIndex0 = i;
for(j=2; j<db[i].length; j++) {
concat+=db[i][j];
}
break;
}
}
alert(dbIndex0+'\n'+concat)