Okay, so as I said in comment to the question, I think you actually need 2D array. That is, if you have N number of questionIds and each questionId has two properties: optionId and optionText
You can create it somehow like this:
var twoD = new Array();
twoD[1] = new Array();
twoD[1]['optionId'] = 3;
twoD[1]['optionText'] = 'blabla';
twoD[2] = new Array();
twoD[2]['optionId'] = 5;
twoD[2]['optionText'] = null;
alert(twoD[1]['optionId']);
Although note that array with associative key is actually an object in JavaScript.
Update: looping through JavaScript
for(var question : twoD){
alert(question['optionId']);
alert(question['optionText']);
}